You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] schema_validate with no identifier or note_type defaults to validating type 'unknown' instead of all types #1013
Calling schema_validate without identifier or note_type returns a "no notes found of type 'unknown'" hint instead of validating every typed note in the project.
Repro
schema_validate(project_id="...")
→ # No Notes Found of Type 'unknown'
schema_validate found no notes with type 'unknown' in the project.
To actually get full-project coverage, the caller has to enumerate every note_type and call validate once per type — which means knowing the types up front.
Expected
When neither identifier nor note_type is provided, validate every note type that has a defined schema in the project, returning a per-type summary. Something like:
# Schema Validation: all types
person: 1 / 1 valid
ticket: 2 / 2 valid
runbook: no schema defined — skipped
This matches how a fresh agent or CI run would want to use it: "tell me if anything is wrong" without having to know the type list first.
Why it matters
For agents (and humans) running periodic graph health checks, the current default is a footgun — looks like you ran a no-op when really you ran the wrong thing.
Discovered while
Building a help-desk MSP playbook demo for basicmemory.com. Was looking for an "is everything valid?" call at the end of a workflow and got the unknown-type hint instead.
# Nothing to Validate
`schema_validate` found no notes for any schema-covered type.
This means either no schema definitions exist, or no notes have been created for the defined types yet.
...
Status: still valid on main. The batch path in schema_router.py is gated on note_type (... if note_type else []), so the no-args call returns an empty batch that renders as the misleading "unknown" default in mcp/tools/schema.py. An automated fix was drafted back in June (commit 863afd9) but the branch was never pushed, so nothing landed.
Plan: add a real all-types branch that enumerates schema-covered note types and returns a per-type summary (person: 1/1 valid style), with router- and tool-level tests for the no-args path.
Activity
claude commentedon Jun 23, 2026
Claude finished @phernandez's task in 8m 12s —— View job
Triage & Fix Complete
Labels applied:
bugClassification: Bug — Medium priority, Medium complexity
Root Cause
Two places combine to produce the misleading "type 'unknown'" output:
schema_router.py:190— the batch validation path was gated onnote_type:When neither
note_typenoridentifieris provided, this always returns an empty list →total_entities=0,note_type=None.mcp/tools/schema.py:287— the guard then fell through to a string default:All three are
None/falsy, soeffective_type = "unknown"→ "No Notes Found of Type 'unknown'".Fix (4 files)
schema_router.py— add_find_covered_types()helper; when no args given, find all schema note entity types and gather entities across all of themmcp/tools/schema.py— detectall_types_mode, show "Nothing to Validate" guidance (not "type unknown") when empty, add "By Type" per-type summary in formatterjust fast-check— blocked: test runner requires permissions not available in this jobgithub-actions[bot]lacks write access to this repoThe commit is ready locally (
863afd9) but could not be pushed. Changes are in branchclaude/issue-1013-20260623-1651.What the fix produces
No-schema-defined case now returns:
phernandez commentedon Jul 15, 2026
Status: still valid on main. The batch path in
schema_router.pyis gated onnote_type(... if note_type else []), so the no-args call returns an empty batch that renders as the misleading "unknown" default inmcp/tools/schema.py. An automated fix was drafted back in June (commit863afd9) but the branch was never pushed, so nothing landed.Plan: add a real all-types branch that enumerates schema-covered note types and returns a per-type summary (
person: 1/1 validstyle), with router- and tool-level tests for the no-args path.fix(mcp): validate all schema-covered types when schema_validate gets…
fix(mcp): validate all schema-covered types when schema_validate gets…