Skip to content

Bug: structuredContent returns string instead of record, breaking tool calls #6

@Photobombastic

Description

@Photobombastic

Description

When calling any AgentMail MCP tool (e.g., list_inboxes, create_inbox), the server returns an error because structuredContent is a string instead of a record/object.

Error Message

MCP error -32602: Invalid tools/call result: [
  {
    "expected": "record",
    "code": "invalid_type",
    "path": ["structuredContent"],
    "message": "Invalid input: expected record, received string"
  }
]

Environment

  • Client: Claude Desktop (claude-ai version 0.1.0)
    • Protocol version: 2025-06-18
      • agentmail-mcp: latest via npx

Steps to Reproduce

  1. Configure agentmail-mcp in Claude Desktop with a valid API key
    1. Call any tool (e.g., list_inboxes)
    1. Observe the error

Expected Behavior

Tool calls should succeed and return properly formatted results with structuredContent as an object/record.

Actual Behavior

All tool calls fail with the above validation error.


Contact: sagelearns@proton.me

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