Skip to content

server-memory: Output schema has additionalProperties: false but response includes 'type' field #3210

Closed

Description

@synth-mania

Description

When using the @modelcontextprotocol/server-memory package with the MCP Python client library, the search_nodes tool fails validation when entities exist in the knowledge graph.

Steps to Reproduce

  1. Use @modelcontextprotocol/server-memory via npx
  2. Create an entity: create_entities with {"entities": [{"name": "Test", "entityType": "Person", "observations": ["test obs"]}]}
  3. Search for the entity: search_nodes with {"query": "Test"}

Expected Behavior

The search result should pass validation and return successfully.

Actual Behavior

The MCP Python client throws a validation error:
RuntimeError: Invalid structured content returned by tool search_nodes: Additional properties are not allowed ('type' was unexpected)

On instance['entities'][0]: {'type': 'entity', 'name': 'Test', 'entityType': 'Person', 'observations': ['test obs']}

Root Cause

The search_nodes tool's output schema declares additionalProperties: false for entity items, but the actual response includes a type: "entity" field that isn't in the schema definition.

Suggested Fix

Either:

  1. Add type to the output schema properties, or
  2. Remove additionalProperties: false from the schema, or
  3. Remove the type field from the response

Environment

  • @modelcontextprotocol/server-memory via npx (latest)
  • MCP Python client library
  • Python 3.12

Activity

  1. SashankMeka1 commented on Jan 15, 2026

    @SashankMeka1

    This can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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