-
Notifications
You must be signed in to change notification settings - Fork 10
Open
agentmail-to/agentmail-toolkit
#13Description
Description
The agentmail-mcp package returns tool results using the structuredContent field instead of the content field. This causes compatibility issues with Claude Code and other MCP clients that expect results in the content field.
Error
When calling any tool (e.g., list_inboxes, get_inbox), Claude Code returns:
MCP error -32602: Invalid tools/call result: [
{
"expected": "record",
"code": "invalid_type",
"path": ["structuredContent"],
"message": "Invalid input: expected record, received string"
}
]
Environment
agentmail-mcpversion: 0.2.1- Client: Claude Code CLI
- MCP server shows as "Connected" via
claude mcp list
Expected Behavior
Tool results should be returned in a format compatible with the MCP specification that Claude Code can parse.
Related Issues
This appears to be a known issue affecting multiple MCP adapter libraries:
- langchain-mcp-adapters ignores structuredContent field from MCP tool responses langchain-ai/langchain-mcp-adapters#283
- Python: MCP CallToolResult.structuredContent field is not parsed, causing tool results to return None microsoft/agent-framework#3313
Workaround
Currently using the AgentMail REST API directly as a workaround.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels