describe_component
Retrieve detailed JSON Schema for a specified schema name within the ACOMO MCP Server. Facilitates API exploration and schema inspection for backend services.
Instructions
指定schema名の詳細(JSON Schema)を返す
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/server.ts:268-280 (handler)Handler function that executes the describe_component tool logic: calls getComponentSchema and returns the JSON Schema or an error message.async ({ name }: { name: string }) => { const schema = await getComponentSchema(name); if (!schema) return { content: [{ type: "text", text: `Unknown component: ${name}` }], isError: true, }; return { content: [ { type: "text", text: JSON.stringify(schema, null, 2) }, ], }; }
- src/server.ts:263-267 (schema)Tool metadata including title, description, and input schema requiring a 'name' string parameter using Zod.{ title: "Describe component", description: "指定schema名の詳細(JSON Schema)を返す", inputSchema: { name: z.string() }, },
- src/server.ts:261-281 (registration)Registration of the 'describe_component' tool using McpServer.registerTool with schema and handler.server.registerTool( "describe_component", { title: "Describe component", description: "指定schema名の詳細(JSON Schema)を返す", inputSchema: { name: z.string() }, }, async ({ name }: { name: string }) => { const schema = await getComponentSchema(name); if (!schema) return { content: [{ type: "text", text: `Unknown component: ${name}` }], isError: true, }; return { content: [ { type: "text", text: JSON.stringify(schema, null, 2) }, ], }; } );
- src/openapi.ts:78-81 (helper)Helper function that loads the OpenAPI spec and retrieves the schema for the given component name.export async function getComponentSchema(name: string): Promise<any | null> { const spec = await loadOpenApi(); return spec.components?.schemas?.[name] ?? null; }