get_task
Retrieve a specific task by its unique ID to access task details and information within the MCP Test Server system.
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 implements the logic to retrieve a specific task by ID, matching the 'get_task' tool's purpose.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)Defines the input schema for the 'get_task' tool, specifying required 'id' parameter.{ 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:39-47 (registration)Registers the list of available tools, including taskToolSchemas which contains the 'get_task' schema.return { tools: [ ...userToolSchemas, ...taskToolSchemas, searchToolSchema ] }; });