aspro_describe
Retrieves the full API schema for a REST operation by providing module, entity, and method. Returns HTTP method, path, parameters, and request-body fields with types and descriptions.
Instructions
Return the full schema for one operation: HTTP method, path, query/path parameters, request-body fields with types and descriptions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | Yes | ||
| entity | Yes | ||
| method | Yes | Method segment, e.g. 'list', 'get', 'create', 'update', 'delete'. |
Implementation Reference
- src/index.ts:124-144 (handler)The handler function for 'aspro_describe'. It calls spec.describe(module, entity, method) and returns the full operation schema (HTTP method, path, query/path parameters, request-body fields, etc.) or an error message if not found.
async ({ module, entity, method }) => { const op = spec.describe(module, entity, method); if (!op) { return asJson({ error: `No operation ${module}/${entity}/${method}. Use aspro_list_methods to discover.`, }); } return asJson({ module: op.module, entity: op.entity, method: op.method, httpMethod: op.httpMethod, path: op.path, description: op.description, tags: op.tags, parameters: op.parameters, bodyContentType: op.bodyContentType, bodyRequired: op.bodyRequired, bodyProperties: op.bodyProperties, }); }, - src/index.ts:118-123 (schema)The Zod input schema for 'aspro_describe', defining module, entity, and method as required strings.
inputSchema: { module: z.string(), entity: z.string(), method: z.string().describe("Method segment, e.g. 'list', 'get', 'create', 'update', 'delete'."), }, }, - src/index.ts:113-145 (registration)Registration of the 'aspro_describe' tool via server.registerTool(), binding name, description, schema, and handler together.
server.registerTool( "aspro_describe", { description: "Return the full schema for one operation: HTTP method, path, query/path parameters, request-body fields with types and descriptions.", inputSchema: { module: z.string(), entity: z.string(), method: z.string().describe("Method segment, e.g. 'list', 'get', 'create', 'update', 'delete'."), }, }, async ({ module, entity, method }) => { const op = spec.describe(module, entity, method); if (!op) { return asJson({ error: `No operation ${module}/${entity}/${method}. Use aspro_list_methods to discover.`, }); } return asJson({ module: op.module, entity: op.entity, method: op.method, httpMethod: op.httpMethod, path: op.path, description: op.description, tags: op.tags, parameters: op.parameters, bodyContentType: op.bodyContentType, bodyRequired: op.bodyRequired, bodyProperties: op.bodyProperties, }); }, ); - src/spec.ts:180-182 (helper)The SpecIndex.describe() helper method that looks up an operation by module/entity/method key in the internal byKey map.
describe(module: string, entity: string, method: string): OperationSpec | undefined { return this.byKey.get(this.makeKey(module, entity, method)); }