Skip to main content
Glama
yvanfreitas

MCP Test Server

by yvanfreitas

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
NameRequiredDescriptionDefault
idYesTask ID

Implementation Reference

  • 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 }; }
  • 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 ] }; });

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yvanfreitas/MCP-test'

If you have feedback or need assistance with the MCP directory API, please join our Discord server