mcp/mcpEntity.ts

jan · core/src/types/mcp/mcpEntity.ts · typescript · Apache-2.0
ai, tag:knn-classified

TypeScript interfaces for MCP tool and server metadata.

// Source: https://github.com/janhq/jan | License: Apache-2.0 | Copyright 2025 Menlo Research
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * MCP (Model Context Protocol) entities
 */

export interface MCPTool {
  name: string
  description: string
  inputSchema: Record<string, unknown>
  server: string
}

export interface MCPToolCallResult {
  error: string
  content: Array<{
    type?: string
    text: string
  }>
}

export interface MCPServerInfo {
  name: string
  connected: boolean
  tools?: MCPTool[]
}

/**
 * Props for MCP tool UI components
 */
export interface MCPToolComponentProps {
  /** List of available MCP tools */
  tools: MCPTool[]

  /** Function to check if a specific tool is currently enabled */
  isToolEnabled: (toolName: string) => boolean

  /*

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key