er_record_list
Retrieve and manage records linked to a specific Edge Routine by specifying its name, page number, page size, and optional search keyword for precise filtering and pagination.
Instructions
List all records associated with a specific Edge Routine (ER).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Name | Yes | The name of the routine | |
| PageNumber | No | The page number of the records | |
| PageSize | No | The page size of the records | |
| SearchKeyWord | No | The search key word of the records |
Implementation Reference
- src/tools/er/record.ts:108-116 (handler)Handler function that implements the core logic of the er_record_list tool by calling the API to list routine-related records and returning the JSON response.export const er_record_list = async (request: CallToolRequest) => { const res = await api.listRoutineRelatedRecords( request.params.arguments as unknown as ListRoutineRelatedRecordsRequest, ); return { content: [{ type: 'text', text: JSON.stringify(res) }], success: true, }; };
- src/tools/er/record.ts:60-85 (schema)Tool definition including name, description, and input schema for the er_record_list tool.export const ER_RECORD_LIST_TOOL: Tool = { name: 'er_record_list', description: 'List all records associated with a specific Edge Routine (ER).', inputSchema: { type: 'object', properties: { Name: { type: 'string', description: 'The name of the routine', }, PageNumber: { type: 'number', description: 'The page number of the records', }, PageSize: { type: 'number', description: 'The page size of the records', }, SearchKeyWord: { type: 'string', description: 'The search key word of the records', }, }, required: ['Name'], }, };
- src/tools/list-esa-function.ts:103-123 (registration)The ER_RECORD_LIST_TOOL is registered in the ESA_OPENAPI_ER_LIST array, which is combined into ESA_OPENAPI_LIST provided to the MCP server for tool listing.export const ESA_OPENAPI_ER_LIST = [ HTML_DEPLOY_TOOL, ROUTINE_CREATE_TOOL, ROUTINE_DELETE_TOOL, ROUTINE_LIST_TOOL, ROUTINE_GET_TOOL, ROUTINE_CODE_COMMIT_TOOL, ROUTINE_CODE_DEPLOY_TOOL, ROUTINE_ROUTE_LIST_TOOL, DEPLOYMENT_DELETE_TOOL, SITE_ACTIVE_LIST_TOOL, SITE_ROUTE_LIST_TOOL, ROUTE_CREATE_TOOL, ROUTE_DELETE_TOOL, ROUTE_UPDATE_TOOL, ROUTE_GET_TOOL, SITE_MATCH_TOOL, ER_RECORD_CREATE_TOOL, ER_RECORD_DELETE_TOOL, ER_RECORD_LIST_TOOL, ];
- src/tools/list-esa-function.ts:183-183 (registration)The er_record_list handler is mapped in the esaHandlers object used by the MCP server to dispatch tool calls.er_record_list,
- src/index.ts:24-39 (registration)Top-level MCP server registration: sets handlers for listing tools via ESA_OPENAPI_LIST and executing tools via esaHandlers.// Define available tools server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: ESA_OPENAPI_LIST }; }); // Handle tool execution server.setRequestHandler(CallToolRequestSchema, async (request) => { const toolName = request.params.name; log( 'Received tool call:', toolName, 'Params:', JSON.stringify(request.params), ); return await esaHandlers[toolName](request); });