Bug Description
The write_note, read_note, canvas, search_notes, and recent_activity tools in basic-memory MCP consistently fail Pydantic validation when invoked by a local LLM (qwen3.6-27b, quite capable in toolcalling in other situations). Input payloads contain malformed structures with unexpected keys like : [, [{, or fragmented JSON, suggesting a mismatch between the exposed MCP schema and the Pydantic validator.
Steps To Reproduce
- Install via uv:
uvx basic-memory
- Configure MCP client to connect to the server
- Prompt the model to use any memory tool with standard parameters
- Observe
ValidationError exceptions in server logs
Expected Behavior
Model generates valid tool calls matching Pydantic schemas; server accepts and processes them successfully.
Actual Behavior
Repeated validation failures across all tested tools. Representative error:
ValidationError: 3 validation errors for call[write_note]
title
Missing required argument [type=missing_argument, input_value={'content': '...', ': [': [{}, '[{']}, input_type=dict]
: [
Unexpected keyword argument [type=unexpected_keyword_argument, input_value=[{}, '[{'], input_type=list]
Key pattern: legitimate parameter values appear assigned to garbage keys (: [, [{), while required fields are reported missing. Failures are non-deterministic.
Environment
- OS: CachyOS (Arch derivative)
- Python: 3.13 | Basic Memory: 0.20.3 | uv: 0.11.10
- LLM: Jackrong/Qwopus3.6-27B-v1-preview-Q4_K_M (LMStudio)
- MCP client: standard
mcp Python library
Additional Context
- Issue persists across tools and prompts; no custom config used
- Same model works with other MCP servers having simpler schemas
- Error pattern suggests schema serialization or LLM interpretation issue, not model capability
Possible Solution
- Audit JSON Schema exposure via
tools/list for ambiguity or mismatch with Pydantic models
- Add pre-validation logging to capture raw payloads before Pydantic processing
- Simplify tool schemas: flatten nested params, clarify field descriptions, avoid complex unions
- Consider lenient pre-processing to filter unknown keys before validation
Bug Description
The
write_note,read_note,canvas,search_notes, andrecent_activitytools in basic-memory MCP consistently fail Pydantic validation when invoked by a local LLM (qwen3.6-27b, quite capable in toolcalling in other situations). Input payloads contain malformed structures with unexpected keys like: [,[{, or fragmented JSON, suggesting a mismatch between the exposed MCP schema and the Pydantic validator.Steps To Reproduce
uvx basic-memoryValidationErrorexceptions in server logsExpected Behavior
Model generates valid tool calls matching Pydantic schemas; server accepts and processes them successfully.
Actual Behavior
Repeated validation failures across all tested tools. Representative error:
Key pattern: legitimate parameter values appear assigned to garbage keys (
: [,[{), while required fields are reported missing. Failures are non-deterministic.Environment
mcpPython libraryAdditional Context
Possible Solution
tools/listfor ambiguity or mismatch with Pydantic models