Skip to main content
Glama
progress-all

ACOMO MCP Server

by progress-all

API schemas

api_schemas

Extract parameters, request body, and responses using the operationId from ACOMO API schemas. Simplify API exploration and operation analysis within the ACOMO MCP Server.

Instructions

operationIdからparameters/requestBody/responsesを抜粋

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationIdYes

Implementation Reference

  • Handler function for the 'api_schemas' tool. It retrieves the operation schemas using getOperationSchemas and returns them as formatted JSON text or an error if not found.
    async ({ operationId }: { operationId: string }) => {
      const schemas = await getOperationSchemas(operationId);
      if (!schemas)
        return {
          content: [
            { type: "text", text: `Unknown operationId: ${operationId}` },
          ],
          isError: true,
        };
      return {
        content: [
          { type: "text", text: JSON.stringify(schemas, null, 2) },
        ],
      };
    }
  • Zod input schema definition for the 'api_schemas' tool, requiring an 'operationId' string.
    inputSchema: { operationId: z.string() },
  • src/server.ts:90-112 (registration)
    Registration of the 'api_schemas' tool using server.registerTool, including title, description, input schema, and inline handler.
    server.registerTool(
      "api_schemas",
      {
        title: "API schemas",
        description: "operationIdからparameters/requestBody/responsesを抜粋",
        inputSchema: { operationId: z.string() },
      },
      async ({ operationId }: { operationId: string }) => {
        const schemas = await getOperationSchemas(operationId);
        if (!schemas)
          return {
            content: [
              { type: "text", text: `Unknown operationId: ${operationId}` },
            ],
            isError: true,
          };
        return {
          content: [
            { type: "text", text: JSON.stringify(schemas, null, 2) },
          ],
        };
      }
    );
  • Core helper function getOperationSchemas that extracts parameters, requestBody schema, and responses from the OpenAPI operation for the given operationId. This is called by the tool handler.
    export async function getOperationSchemas(operationId: string): Promise<{
      operationId: string;
      method: string;
      path: string;
      parameters: any[]; // path/query/header
      requestBody?: any; // schema if available
      responses?: Record<string, any>; // status -> schema/desc
    } | null> {
      const found = await findOperationById(operationId);
      if (!found) return null;
      const op = found.raw || {};
      const parameters = op.parameters ?? [];
      let requestBody: any | undefined;
      if (op.requestBody?.content) {
        // prefer application/json
        const json = op.requestBody.content['application/json'] || Object.values(op.requestBody.content)[0];
        requestBody = json?.schema ?? json;
      }
      const responses: Record<string, any> = {};
      if (op.responses) {
        for (const [code, res] of Object.entries(op.responses)) {
          const content = (res as any)?.content;
          const json = content?.['application/json'] || (content && Object.values(content)[0]);
          responses[code] = json?.schema ?? (res as any)?.description ?? res;
        }
      }
      return {
        operationId,
        method: found.method,
        path: found.path,
        parameters,
        requestBody,
        responses,
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions extraction of parameters/requestBody/responses, but doesn't specify what format the output is in (e.g., JSON, text), whether it's a read-only operation (implied but not stated), or any error conditions. The description adds minimal context beyond the basic action, leaving key behavioral traits unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence in Japanese that directly states the action. It's front-loaded with the core purpose and avoids unnecessary words. However, it could be more structured by explicitly naming the resource (e.g., 'from an API schema') for better clarity, but it's efficiently phrased.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (extracting API components), lack of annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't explain the output format, error handling, or how it relates to sibling tools like describe_api. For a tool that likely returns structured data about APIs, more context is needed to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 1 parameter (operationId) with 0% description coverage, so the description must compensate. It mentions 'operationIdから' (from operationId), implying the parameter is an identifier for an API operation, but doesn't explain what operationId refers to (e.g., an OpenAPI operation ID, a specific endpoint), its format, or where to obtain it. This adds marginal meaning but insufficient for full understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'operationIdからparameters/requestBody/responsesを抜粋' (extract parameters/requestBody/responses from operationId) states a specific action (extract) and target (API components), but it's vague about what resource this operates on (API schemas? OpenAPI spec?) and doesn't distinguish from siblings like describe_api or describe_component. It provides a basic purpose but lacks specificity about scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like describe_api or describe_component. The description implies extraction of specific API components, but there's no explicit context about prerequisites, when-not scenarios, or comparison to sibling tools. Usage is left to inference from the tool name and description alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/progress-all/acomo-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server