Skip to main content
Glama

api-automation

Automatically generates API types, endpoint constants, mock data, and request functions from backend API documentation to streamline integration and development workflows.

Instructions

理解后端接口文档自动生成接口类型、地址常量、mock数据、请求函数等

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiDocsYes后端接口文档内容

Implementation Reference

  • Registers the 'api-automation' MCP tool, defining its name, description, input schema (apiDocs string), and execute handler that constructs an XML prompt using imported prompt templates and the provided API documentation.
    private apiAutomation(): void { this.server.addTool({ name: 'api-automation', description: '理解后端接口文档自动生成接口类型、地址常量、mock数据、请求函数等', parameters: z.object({ apiDocs: z .string() .describe('后端接口文档内容'), }), execute: async ({ apiDocs, }) => { const prompt: string = ` <xml> <project-standard>${projectStandardsPrompt}</project-standard> <prompt>${apiAutomationPrompt}</prompt> <apiDocs>${apiDocs}</apiDocs> </xml> ` return prompt }, }) }
  • src/server.ts:40-40 (registration)
    Invokes registerTools on the UtilityTools instance, which in turn calls apiAutomation() to register the 'api-automation' tool.
    this.utilityTools.registerTools()
  • The execute handler constructs and returns a structured XML prompt for API automation based on imported templates and the apiDocs input.
    execute: async ({ apiDocs, }) => { const prompt: string = ` <xml> <project-standard>${projectStandardsPrompt}</project-standard> <prompt>${apiAutomationPrompt}</prompt> <apiDocs>${apiDocs}</apiDocs> </xml> ` return prompt }, })
  • Zod schema defining the input parameter 'apiDocs' as a string describing the backend API documentation content.
    parameters: z.object({ apiDocs: z .string() .describe('后端接口文档内容'), }),

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/Panzer-Jack/feuse-mcp'

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