Skip to content

bug: json schema generated is incorrect #14

@JosiahParry

Description

@JosiahParry

The tools/list from my MCP server is generating the following output. For of them are generating properties":[] which should instead be properties: {}.

{"jsonrpc":"2.0","result":{"tools":[{"name":"add_todo","description":"Create a new todo item","inputSchema":{"type":"object","properties":{"title":{"type":"string","title":"Title","description":"The todo title"},"description":{"type":"string","title":"Description","description":"Detailed description of the todo"},"deadline":{"type":"string","title":"Deadline","description":"Deadline as ISO 8601 date string (e.g., '2026-01-15')"},"priority":{"type":"number","title":"Priority","description":"Priority level from 1 (lowest) to 5 (highest)"},"tags":{"type":"array","title":"Tags","description":"List of tags for categorization","items":{"type":"string","title":"Tag","description":"A tag string"}},"category":{"type":"string","title":"Category","description":"Category ID (ULID) for the todo"}},"additionalProperties":false,"required":["title"]}},{"name":"get_todo","description":"Retrieve a specific todo by ID","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the todo to retrieve"}},"additionalProperties":false,"required":["id"]}},{"name":"update_todo","description":"Update fields of an existing todo","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the todo to update"},"title":{"type":"string","title":"Title","description":"New title for the todo"},"description":{"type":"string","title":"Description","description":"New description"},"deadline":{"type":"string","title":"Deadline","description":"New deadline as ISO 8601 date string"},"priority":{"type":"number","title":"Priority","description":"New priority level (1-5)"},"tags":{"type":"array","title":"Tags","description":"New list of tags","items":{"type":"string","title":"Tag","description":"A tag string"}},"category":{"type":"string","title":"Category","description":"New category ID"}},"additionalProperties":false,"required":["id"]}},{"name":"delete_todo","description":"Delete a todo by ID","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the todo to delete"}},"additionalProperties":false,"required":["id"]}},{"name":"mark_complete","description":"Mark a todo as completed","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the todo to mark complete"}},"additionalProperties":false,"required":["id"]}},{"name":"list_all","description":"List all todos (completed and incomplete)","inputSchema":{"type":"object","properties":[],"additionalProperties":false}},{"name":"list_incomplete","description":"List all incomplete todos","inputSchema":{"type":"object","properties":[],"additionalProperties":false}},{"name":"list_completed","description":"List all completed todos","inputSchema":{"type":"object","properties":[],"additionalProperties":false}},{"name":"add_category","description":"Create a new category","inputSchema":{"type":"object","properties":{"title":{"type":"string","title":"Title","description":"The category title"},"description":{"type":"string","title":"Description","description":"Description of the category"}},"additionalProperties":false,"required":["title"]}},{"name":"get_category","description":"Retrieve a specific category by ID","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the category to retrieve"}},"additionalProperties":false,"required":["id"]}},{"name":"update_category","description":"Update fields of an existing category","inputSchema":{"type":"object","properties":{"id":{"type":"string","title":"ID","description":"The ULID of the category to update"},"title":{"type":"string","title":"Title","description":"New title for the category"},"description":{"type":"string","title":"Description","description":"New description"}},"additionalProperties":false,"required":["id"]}},{"name":"list_categories","description":"List all categories","inputSchema":{"type":"object","properties":[],"additionalProperties":false}}]},"id":1}

This results in an error from claude mcp integration

2026-01-13T00:00:30.963Z [DEBUG] MCP server "chief": Successfully connected to http server in 342ms
2026-01-13T00:00:30.963Z [DEBUG] MCP server "chief": Connection established with capabilities: {"hasTools":true,"hasPrompts":true,"hasResources":true,"serverVersion":{"name":"Chief Portfolio Server","version":"0.0.0.9000"}}
2026-01-13T00:00:30.967Z [DEBUG] MCP server "chief": No token data found
2026-01-13T00:00:30.967Z [DEBUG] MCP server "chief": No token data found
2026-01-13T00:00:30.967Z [DEBUG] MCP server "chief": No token data found
2026-01-13T00:00:30.973Z [ERROR] MCP server "chief" Failed to fetch tools: [
  {
    "expected": "record",
    "code": "invalid_type",
    "path": [
      "tools",
      5,
      "inputSchema",
      "properties"
    ],
    "message": "Invalid input: expected record, received array"
  },
  {
    "expected": "record",
    "code": "invalid_type",
    "path": [
      "tools",
      6,
      "inputSchema",
      "properties"
    ],
    "message": "Invalid input: expected record, received array"
  },
  {
    "expected": "record",
    "code": "invalid_type",
    "path": [
      "tools",
      7,
      "inputSchema",
      "properties"
    ],
    "message": "Invalid input: expected record, received array"
  },
  {
    "expected": "record",
    "code": "invalid_type",
    "path": [
      "tools",
      11,
      "inputSchema",
      "properties"
    ],
    "message": "Invalid input: expected record, received array"
  }
]

I believe i can fix this by updating the properties correctly in my MCP server, but it would be great if this was caught by mcpr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions