Skip to content

Commit 7d663b1

Browse files
committed
fix(mcp): remove escaped quotes from tools JSON causing "key must be a string" panic
1 parent b160d5f commit 7d663b1

1 file changed

Lines changed: 115 additions & 115 deletions

File tree

src/mcp.rs

Lines changed: 115 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,145 +1892,145 @@ fn list_tools(id: Option<Value>) -> JsonRpcResponse {
18921892
"created_at_unix_ms": {"type": "integer"}
18931893
}
18941894
},
1895-
\"annotations\": {
1896-
\"destructiveHint\": true
1895+
"annotations": {
1896+
"destructiveHint": true
18971897
}
18981898
},
18991899
{
1900-
\"name\": \"mimir_autocohere\",
1901-
\"description\": \"Run a full atomic grooming pass: cohere (promote, link, archive), then decay (recalculate Ebbinghaus decay), then compact (archive below threshold). Returns a summary report. Use dry_run=true to preview without changes.\",
1902-
\"inputSchema\": {
1903-
\"type\": \"object\",
1904-
\"properties\": {
1905-
\"dry_run\": {
1906-
\"type\": \"boolean\",
1907-
\"description\": \"If true, preview changes without writing\",
1908-
\"default\": false
1900+
"name": "mimir_autocohere",
1901+
"description": "Run a full atomic grooming pass: cohere (promote, link, archive), then decay (recalculate Ebbinghaus decay), then compact (archive below threshold). Returns a summary report. Use dry_run=true to preview without changes.",
1902+
"inputSchema": {
1903+
"type": "object",
1904+
"properties": {
1905+
"dry_run": {
1906+
"type": "boolean",
1907+
"description": "If true, preview changes without writing",
1908+
"default": false
19091909
}
19101910
}
19111911
},
1912-
\"outputSchema\": {
1913-
\"type\": \"object\",
1914-
\"properties\": {
1915-
\"promoted_entities\": {\"type\": \"integer\", \"description\": \"Entities promoted during cohere\"},
1916-
\"links_created\": {\"type\": \"integer\", \"description\": \"Auto-links created during cohere\"},
1917-
\"archived_entities\": {\"type\": \"integer\", \"description\": \"Entities archived (cohere + compact)\"},
1918-
\"decay_updates\": {\"type\": \"integer\", \"description\": \"Entities whose decay score was updated\"},
1919-
\"compact_archived_count\": {\"type\": \"integer\", \"description\": \"Entities archived during compact step\"},
1920-
\"db_size_delta_bytes\": {\"type\": \"integer\", \"description\": \"Change in SQLite file size in bytes\"},
1921-
\"dry_run\": {\"type\": \"boolean\"}
1912+
"outputSchema": {
1913+
"type": "object",
1914+
"properties": {
1915+
"promoted_entities": {"type": "integer", "description": "Entities promoted during cohere"},
1916+
"links_created": {"type": "integer", "description": "Auto-links created during cohere"},
1917+
"archived_entities": {"type": "integer", "description": "Entities archived (cohere + compact)"},
1918+
"decay_updates": {"type": "integer", "description": "Entities whose decay score was updated"},
1919+
"compact_archived_count": {"type": "integer", "description": "Entities archived during compact step"},
1920+
"db_size_delta_bytes": {"type": "integer", "description": "Change in SQLite file size in bytes"},
1921+
"dry_run": {"type": "boolean"}
19221922
}
19231923
},
1924-
\"annotations\": {
1925-
\"destructiveHint\": true
1924+
"annotations": {
1925+
"destructiveHint": true
19261926
}
19271927
},
19281928
{
1929-
\"name\": \"mimir_supersede\",
1930-
\"description\": \"Create a 'supersedes' relationship from a new fact to an old one, setting the old entity's status to 'deprecated'. Use this when a newer entity makes an older one obsolete.\",
1931-
\"inputSchema\": {
1932-
\"type\": \"object\",
1933-
\"properties\": {
1934-
\"from_category\": {
1935-
\"type\": \"string\",
1936-
\"description\": \"Category of the OLD entity being superseded\"
1937-
},
1938-
\"from_key\": {
1939-
\"type\": \"string\",
1940-
\"description\": \"Key of the OLD entity being superseded\"
1941-
},
1942-
\"to_category\": {
1943-
\"type\": \"string\",
1944-
\"description\": \"Category of the NEW entity that supersedes\"
1945-
},
1946-
\"to_key\": {
1947-
\"type\": \"string\",
1948-
\"description\": \"Key of the NEW entity that supersedes\"
1949-
},
1950-
\"reason\": {
1951-
\"type\": \"string\",
1952-
\"description\": \"Reason for superseding (recorded in archive_reason)\",
1953-
\"default\": \"\"
1954-
},
1955-
\"relationship\": {
1956-
\"type\": \"string\",
1957-
\"description\": \"Link relationship type (default: 'supersedes')\",
1958-
\"default\": \"supersedes\"
1929+
"name": "mimir_supersede",
1930+
"description": "Create a 'supersedes' relationship from a new fact to an old one, setting the old entity's status to 'deprecated'. Use this when a newer entity makes an older one obsolete.",
1931+
"inputSchema": {
1932+
"type": "object",
1933+
"properties": {
1934+
"from_category": {
1935+
"type": "string",
1936+
"description": "Category of the OLD entity being superseded"
1937+
},
1938+
"from_key": {
1939+
"type": "string",
1940+
"description": "Key of the OLD entity being superseded"
1941+
},
1942+
"to_category": {
1943+
"type": "string",
1944+
"description": "Category of the NEW entity that supersedes"
1945+
},
1946+
"to_key": {
1947+
"type": "string",
1948+
"description": "Key of the NEW entity that supersedes"
1949+
},
1950+
"reason": {
1951+
"type": "string",
1952+
"description": "Reason for superseding (recorded in archive_reason)",
1953+
"default": ""
1954+
},
1955+
"relationship": {
1956+
"type": "string",
1957+
"description": "Link relationship type (default: 'supersedes')",
1958+
"default": "supersedes"
19591959
}
19601960
},
1961-
\"required\": [\"from_category\", \"from_key\", \"to_category\", \"to_key\"]
1962-
},
1963-
\"outputSchema\": {
1964-
\"type\": \"object\",
1965-
\"properties\": {
1966-
\"from_entity_id\": {\"type\": \"string\", \"description\": \"ID of the old (superseded) entity\"},
1967-
\"from_entity_category\": {\"type\": \"string\"},
1968-
\"from_entity_key\": {\"type\": \"string\"},
1969-
\"to_entity_id\": {\"type\": \"string\", \"description\": \"ID of the new (superseding) entity\"},
1970-
\"to_entity_category\": {\"type\": \"string\"},
1971-
\"to_entity_key\": {\"type\": \"string\"},
1972-
\"relationship\": {\"type\": \"string\"},
1973-
\"status_updated\": {\"type\": \"string\", \"description\": \"New status of the old entity (always 'deprecated')\"}
1961+
"required": ["from_category", "from_key", "to_category", "to_key"]
1962+
},
1963+
"outputSchema": {
1964+
"type": "object",
1965+
"properties": {
1966+
"from_entity_id": {"type": "string", "description": "ID of the old (superseded) entity"},
1967+
"from_entity_category": {"type": "string"},
1968+
"from_entity_key": {"type": "string"},
1969+
"to_entity_id": {"type": "string", "description": "ID of the new (superseding) entity"},
1970+
"to_entity_category": {"type": "string"},
1971+
"to_entity_key": {"type": "string"},
1972+
"relationship": {"type": "string"},
1973+
"status_updated": {"type": "string", "description": "New status of the old entity (always 'deprecated')"}
19741974
}
19751975
},
1976-
\"annotations\": {
1977-
\"destructiveHint\": true
1976+
"annotations": {
1977+
"destructiveHint": true
19781978
}
19791979
},
19801980
{
1981-
\"name\": \"mimir_maintenance\",
1982-
\"description\": \"Database maintenance operations: deduplicate entities with identical (category, key), detect orphan journal entries and links, vacuum (reclaim disk space), reindex FTS5. Set dry_run=true to preview. Use 'all' to run everything.\",
1983-
\"inputSchema\": {
1984-
\"type\": \"object\",
1985-
\"properties\": {
1986-
\"dedup\": {
1987-
\"type\": \"boolean\",
1988-
\"description\": \"Find duplicate (category, key) entities and archive the oldest\",
1989-
\"default\": false
1990-
},
1991-
\"orphans\": {
1992-
\"type\": \"boolean\",
1993-
\"description\": \"Detect journal entries and links pointing to non-existent entities\",
1994-
\"default\": false
1995-
},
1996-
\"vacuum\": {
1997-
\"type\": \"boolean\",
1998-
\"description\": \"Run SQLite VACUUM to reclaim disk space\",
1999-
\"default\": false
2000-
},
2001-
\"reindex\": {
2002-
\"type\": \"boolean\",
2003-
\"description\": \"Rebuild the FTS5 search index from entities table\",
2004-
\"default\": false
2005-
},
2006-
\"all\": {
2007-
\"type\": \"boolean\",
2008-
\"description\": \"Run all maintenance operations (dedup, orphans, vacuum, reindex)\",
2009-
\"default\": false
2010-
},
2011-
\"dry_run\": {
2012-
\"type\": \"boolean\",
2013-
\"description\": \"If true, preview changes without writing\",
2014-
\"default\": false
1981+
"name": "mimir_maintenance",
1982+
"description": "Database maintenance operations: deduplicate entities with identical (category, key), detect orphan journal entries and links, vacuum (reclaim disk space), reindex FTS5. Set dry_run=true to preview. Use 'all' to run everything.",
1983+
"inputSchema": {
1984+
"type": "object",
1985+
"properties": {
1986+
"dedup": {
1987+
"type": "boolean",
1988+
"description": "Find duplicate (category, key) entities and archive the oldest",
1989+
"default": false
1990+
},
1991+
"orphans": {
1992+
"type": "boolean",
1993+
"description": "Detect journal entries and links pointing to non-existent entities",
1994+
"default": false
1995+
},
1996+
"vacuum": {
1997+
"type": "boolean",
1998+
"description": "Run SQLite VACUUM to reclaim disk space",
1999+
"default": false
2000+
},
2001+
"reindex": {
2002+
"type": "boolean",
2003+
"description": "Rebuild the FTS5 search index from entities table",
2004+
"default": false
2005+
},
2006+
"all": {
2007+
"type": "boolean",
2008+
"description": "Run all maintenance operations (dedup, orphans, vacuum, reindex)",
2009+
"default": false
2010+
},
2011+
"dry_run": {
2012+
"type": "boolean",
2013+
"description": "If true, preview changes without writing",
2014+
"default": false
20152015
}
20162016
}
20172017
},
2018-
\"outputSchema\": {
2019-
\"type\": \"object\",
2020-
\"properties\": {
2021-
\"dedup_archived\": {\"type\": \"integer\", \"description\": \"Number of duplicate entities archived\"},
2022-
\"orphan_journal_entries_found\": {\"type\": \"integer\", \"description\": \"Orphan journal entries detected\"},
2023-
\"orphan_links_found\": {\"type\": \"integer\", \"description\": \"Orphan links detected\"},
2024-
\"vacuum_reclaimed_bytes\": {\"type\": \"integer\", \"description\": \"Disk space reclaimed by VACUUM\"},
2025-
\"reindex_rows_affected\": {\"type\": \"integer\", \"description\": \"Rows reindexed into FTS5\"},
2026-
\"dry_run\": {\"type\": \"boolean\"},
2027-
\"errors\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}, \"description\": \"Errors encountered during maintenance\"}
2018+
"outputSchema": {
2019+
"type": "object",
2020+
"properties": {
2021+
"dedup_archived": {"type": "integer", "description": "Number of duplicate entities archived"},
2022+
"orphan_journal_entries_found": {"type": "integer", "description": "Orphan journal entries detected"},
2023+
"orphan_links_found": {"type": "integer", "description": "Orphan links detected"},
2024+
"vacuum_reclaimed_bytes": {"type": "integer", "description": "Disk space reclaimed by VACUUM"},
2025+
"reindex_rows_affected": {"type": "integer", "description": "Rows reindexed into FTS5"},
2026+
"dry_run": {"type": "boolean"},
2027+
"errors": {"type": "array", "items": {"type": "string"}, "description": "Errors encountered during maintenance"}
20282028
}
20292029
},
2030-
\"annotations\": {
2031-
\"destructiveHint\": true
2030+
"annotations": {
2031+
"destructiveHint": true
20322032
}
2033-
}]\"###
2033+
}]"###
20342034
).expect("tools JSON must be valid");
20352035

20362036
JsonRpcResponse {

0 commit comments

Comments
 (0)