UNPKG

zed.mcp

Version:

MCP server for project analysis, AI rules reading, and dependency checking

56 lines (50 loc) 1.55 kB
export * from "./project-structure"; export * from "./ai-rules"; export * from "./check-dependencies"; export * from "./get-latest-versions"; import { projectStructureDefinition, projectStructureHandler } from "./project-structure"; import { aiRulesDefinition, aiRulesHandler } from "./ai-rules"; import { checkDependenciesDefinition, checkDependenciesHandler } from "./check-dependencies"; import { getLatestVersionsDefinition, getLatestVersionsHandler } from "./get-latest-versions"; import type { ToolDefinition, ToolHandler } from "../types/index"; /** * Tool registry entry */ export interface ToolRegistryEntry { definition: ToolDefinition; handler: ToolHandler; } /** * All available tools in the registry */ export const TOOL_REGISTRY: ToolRegistryEntry[] = [ { definition: projectStructureDefinition, handler: projectStructureHandler, }, { definition: aiRulesDefinition, handler: aiRulesHandler, }, { definition: checkDependenciesDefinition, handler: checkDependenciesHandler, }, { definition: getLatestVersionsDefinition, handler: getLatestVersionsHandler, }, ]; /** * Get all tool definitions */ export function getAllToolDefinitions(): ToolDefinition[] { return TOOL_REGISTRY.map((entry) => entry.definition); } /** * Get a tool handler by name */ export function getToolHandler(name: string): ToolHandler | undefined { const entry = TOOL_REGISTRY.find((e) => e.definition.name === name); return entry?.handler; }