Skip to content

Add MCP Tool Annotations and Structured Output #36

Description

@foxintheloop

Problem

MCP tools lack metadata that helps clients understand tool behavior. The MCP spec (2025-06-18) recommends annotations and structured output.

Solution

Add to each tool definition:

  • annotations with readOnlyHint, destructiveHint, idempotentHint
  • title field for human-readable display names
  • Catch ZodError specifically and format as user-friendly string

Annotation mapping:

  • Read-only: get_tasks, get_task, get_productivity_dashboard, get_priorities
  • Destructive: delete_task, delete_list, delete_goal
  • Non-idempotent: all create/update tools

Files

  • apps/mcp-server/src/tools/*.ts — add annotations to tool definitions
  • apps/mcp-server/src/index.ts — add ZodError formatting in catch block

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions