Skip to main content
Glama

generate_ts_by_endpoint

Generate TypeScript types for request parameters, body, and response from an API endpoint path and HTTP method. Uses Swagger definitions to create accurate, reusable types for your project.

Instructions

根据 API 接口路径和方法生成 TypeScript 类型(请求参数、Body、响应),作为模型输入,可以进一步调整并输出

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAPI路径,如 /access/packageUnit/queryList
methodYesHTTP方法,如 GET, POST, PUT, DELETE
projectNameYes项目名称

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.2

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it generates types and can be further adjusted, but it does not disclose whether the operation is read-only, whether it requires network/cache access, how long it might take, or what the exact output format is. For an unannotated tool, this is a significant gap.

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 sentence with the main action front-loaded. The phrase '作为模型输入,可以进一步调整并输出' adds mild ambiguity but does not bloat the text meaningfully. Efficient and compact.

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?

Without an output schema or annotations, the description must explain what the tool produces and under what conditions. It names 'TypeScript types' as the output but says nothing about structure, return behavior, error handling, or prerequisites such as an existing project. The three parameters are schema-documented, but the tool's operational context is under-specified.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters. The description's reference to 'request parameters, Body, response' hints at the generated content but adds no meaning beyond the schema's parameter descriptions. Baseline of 3 is appropriate.

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

Purpose4/5

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

The description clearly states a specific action ('generate TypeScript types') and the resource (API endpoint path + method). It distinguishes the tool from siblings like get_api_endpoints or get_schemas by focusing on type generation. It is slightly vague in the trailing 'as model input, can be adjusted and output' phrase, but the core purpose is unambiguous.

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?

The description gives no guidance on when to use this tool versus alternatives such as get_schemas or get_api_detail. It does not mention prerequisites (e.g., the swagger project must already be loaded) or situations where a sibling would be more appropriate.

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

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/momei-LJM/mcp-swagger-reader'

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