Skip to main content
Glama
glaucia86
by glaucia86

get_todo

Retrieve a specific task by its unique ID to view details, update status, or manage priorities within your todo list.

Instructions

Get a specific todo by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUUID of the todo to retrieve

Implementation Reference

  • Handler function that executes the 'get_todo' tool: sanitizes and validates input using GetTodoByIdSchema, retrieves todo via service, formats success/error response.
    async handleGetTodo(request: CallToolRequest): Promise<CallToolResult> {
      try {
        const sanitizedArgs = sanitizeInput(request.params.arguments);
        const validatedRequest = validateData(GetTodoByIdSchema, sanitizedArgs);
        const todo = this.todoService.getTodoById(validatedRequest.id);
    
        if (!todo) {
          return {
            content: [
              {
                type: "text",
                text: `❌ Todo com ID ${validatedRequest.id} não encontrado`,
              },
            ],
          };
        }
    
        return {
          content: [
            {
              type: "text",
              text: `📋 Todo encontrado:\n\n${JSON.stringify(todo, null, 2)}`,
            },
          ],
        };
      } catch (error) {
        const errorResponse = createErrorResponse(error, "buscar todo");
        return {
          content: [
            {
              type: "text",
              text: `❌ ${errorResponse.error}\n${errorResponse.details || ""}`,
            },
          ],
        };
      }
    }
  • Zod input schema for validating the 'get_todo' tool request: requires a valid UUID id.
    export const GetTodoByIdSchema = z.object({
      id: UuiSchema
    });
  • MCP tool registration definition for 'get_todo', including JSON input schema for UUID id.
    {
      name: "get_todo",
      description: "Get a specific todo by ID",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            format: "uuid",
            description: "UUID of the todo to retrieve",
          },
        },
        required: ["id"],
      },
    },
  • Core service method that fetches a todo item by ID from the in-memory todos Map.
    getTodoById(id: string): Todo | null {
      const todo = this.todos.get(id);
      return todo || null;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as error handling (e.g., what happens if the ID is invalid), performance aspects (e.g., speed, rate limits), or response format. This leaves gaps for an AI agent to understand operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded and directly states the tool's purpose without unnecessary words, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description is minimal but incomplete. It lacks context on usage scenarios, error cases, or output expectations, which could hinder an AI agent's ability to invoke it correctly without additional inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the parameter 'id' fully documented as a UUID. The description adds minimal value beyond the schema by implying the parameter is for retrieval, but doesn't provide additional context like format examples or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific todo by ID'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_todos' or 'search_todos' beyond the 'by ID' specification, which is implied but not contrasted directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid todo ID), exclusions, or compare it to siblings like 'list_todos' for multiple todos or 'search_todos' for queries. The description assumes context without stating it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/glaucia86/todo-list-mcp-server'

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