Skip to content

Conversation

@majiayu000
Copy link

Summary

Problem

When memory.jsonl contains entities with extra properties (e.g., custom_id), the read_graph tool fails with:

MCP error -32602: Structured content does not match the tool's output schema: 
data/entities/0 must NOT have additional properties

Solution

Using Zod's .passthrough() allows the schema to accept additional properties while still validating required fields.

Fixes #3144

Added .passthrough() to EntitySchema and RelationSchema to allow
entities with extra properties to be read without schema validation
errors. This fixes the issue where read_graph fails when the stored
memory.jsonl contains entities with non-standard properties.

Fixes modelcontextprotocol#3144

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory MCP Schema Validation Error on read_graph for entities with additional properties

1 participant