Description
Calling notes.read with include: ['stats'] returns an MCP output validation error. The headings and links fields in the stats response appear to be objects instead of the numbers the schema expects.
Error
MCP error -32602: Output validation error: Invalid structured content for tool notes.read: [
{
"expected": "number",
"code": "invalid_type",
"path": ["stats", "headings"],
"message": "Invalid input: expected number, received object"
},
{
"expected": "number",
"code": "invalid_type",
"path": ["stats", "links"],
"message": "Invalid input: expected number, received object"
}
]
Steps to reproduce
{
"path": "any-note.md",
"include": ["stats"]
}
Expected behavior
notes.read with include: ['stats'] should return numeric counts for headings and links.
Workaround
Use include: ['content'] or include: ['metadata'] instead — these work correctly.
Environment
- kObsidian: latest (via
npx -y kobsidian-mcp)
- Client: Claude Cowork (Windows)
- OS: Windows 11
Description
Calling
notes.readwithinclude: ['stats']returns an MCP output validation error. Theheadingsandlinksfields in the stats response appear to be objects instead of the numbers the schema expects.Error
Steps to reproduce
{ "path": "any-note.md", "include": ["stats"] }Expected behavior
notes.readwithinclude: ['stats']should return numeric counts forheadingsandlinks.Workaround
Use
include: ['content']orinclude: ['metadata']instead — these work correctly.Environment
npx -y kobsidian-mcp)