list_apis
List all APIs in a workspace using workspace ID, with optional filters for creator, description, and pagination.
Instructions
List all APIs in a workspace
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID (required) | |
| createdBy | No | Filter by creator user ID | |
| cursor | No | Pagination cursor | |
| description | No | Filter by description text | |
| limit | No | Maximum number of results |
Implementation Reference
- src/tools/api/apis/index.ts:100-110 (handler)The listApis method in ApiTools class - makes a GET request to /apis with query params and returns the response. Validates workspaceId is provided.
/** * List all APIs in a workspace * @param params Query parameters including workspaceId (required) */ async listApis(params: any): Promise<ToolCallResponse> { if (!params.workspaceId) { throw new McpError(ErrorCode.InvalidParams, 'workspaceId is required'); } const response = await this.client.get('/apis', { params }); return this.createResponse(response.data); } - src/types/apis.ts:52-58 (schema)TypeScript interface ListApisParams defining the input parameters for list_apis: workspaceId (required), cursor, limit, createdBy, description.
export interface ListApisParams { workspaceId: string; cursor?: string; limit?: number; createdBy?: number; description?: string; } - src/tools/api/apis/definitions.ts:5-34 (registration)Tool definition registration for list_apis, including description and inputSchema (JSON Schema) with workspaceId as required field and optional cursor, limit, createdBy, description properties.
{ name: 'list_apis', description: 'List all APIs in a workspace', inputSchema: { type: 'object', properties: { workspaceId: { type: 'string', description: 'Workspace ID (required)', }, createdBy: { type: 'number', description: 'Filter by creator user ID', }, cursor: { type: 'string', description: 'Pagination cursor', }, description: { type: 'string', description: 'Filter by description text', }, limit: { type: 'number', description: 'Maximum number of results', }, }, required: ['workspaceId'], }, }, - src/tools/api/apis/index.ts:38-40 (registration)Switch case in handleToolCall that routes 'list_apis' to the listApis method.
switch (name) { case 'list_apis': return await this.listApis(args); - src/tools/api/base.ts:118-127 (helper)BasePostmanTool.getToolMappings() - maps tool names (including 'list_apis') to the handler instance, enabling the server dispatcher to route calls to the correct tool.
public getToolMappings(): ToolMapping { const toolDefinitions = this.getToolDefinitions(); const mappings: ToolMapping = {}; toolDefinitions.forEach(tool => { mappings[tool.name] = this; }); return mappings; }