Skip to main content
Glama

Agentic Tools MCP Server

get.ts2.22 kB
import { z } from 'zod'; import { Storage } from '../../storage/storage.js'; /** * Get subtask details by ID * * @param storage - Storage instance * @returns MCP tool handler for getting subtask details */ export function createGetSubtaskTool(storage: Storage) { return { name: 'get_subtask', description: 'Get detailed information about a specific subtask by its ID', inputSchema: { id: z.string() }, handler: async ({ id }: { id: string }) => { try { // Validate input if (!id || id.trim().length === 0) { return { content: [{ type: 'text' as const, text: 'Error: Subtask ID is required.' }], isError: true }; } const subtask = await storage.getSubtask(id.trim()); if (!subtask) { return { content: [{ type: 'text' as const, text: `Error: Subtask with ID "${id}" not found. Use list_subtasks to see all available subtasks.` }], isError: true }; } // Get task and project information const task = await storage.getTask(subtask.taskId); const project = await storage.getProject(subtask.projectId); const taskName = task ? task.name : 'Unknown Task'; const projectName = project ? project.name : 'Unknown Project'; const status = subtask.completed ? '✅ Completed' : '⏳ Pending'; return { content: [{ type: 'text' as const, text: `**${subtask.name}** (ID: ${subtask.id}) **Task:** ${taskName} **Project:** ${projectName} **Status:** ${status} **Details:** ${subtask.details} **Created:** ${new Date(subtask.createdAt).toLocaleString()} **Last Updated:** ${new Date(subtask.updatedAt).toLocaleString()} Use update_subtask to modify this subtask or mark it as completed.` }] }; } catch (error) { return { content: [{ type: 'text' as const, text: `Error retrieving subtask: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } } }; }

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/Pimzino/agentic-tools-mcp'

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