get_task
Retrieve detailed information for a specific task by its unique ID using the JSON-RPC interface on the MCP Test Server.
Instructions
Get a specific task by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task ID |
Implementation Reference
- src/domains/tasks.js:22-36 (handler)TaskService.getById: executes the core logic to fetch a specific task by ID, which implements the 'get_task' tool functionality.static getById(id) { const task = tasks.find(t => t.id === id); if (!task) { return { success: false, message: 'Task not found' }; } return { success: true, data: task }; }
- src/domains/tasks.js:119-132 (schema)Input schema for the 'get_task' tool, defining the required 'id' parameter of type number.{ name: 'get_task', description: 'Get a specific task by ID', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Task ID' } }, required: ['id'] } },
- mcp-server.js:38-46 (registration)Registers the 'get_task' tool by including taskToolSchemas (which contains get_task) in the list of available tools.this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ ...userToolSchemas, ...taskToolSchemas, searchToolSchema ] }; });