{"at":"2026-11-23T00:39:18.515Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T00:39:19.421Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T00:39:19.723Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T00:39:20.504Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}},"instructions":"trace-mcp is a framework-aware code intelligence server for this project. Detected frameworks: none.\n\nTHE RULE (host tool names vary — `read`, `content-match`/grep, `glob` mean whatever yours are called):\n- Full-file `read` for discovery: not the move. Take `get_outline`, then pull the one symbol with `get_symbol`. Read the file directly only when you already have the outline and the span you want is a few lines — or the file is not code (.md/.json/.yaml/config), or you are about to edit it.\n- `content-match` or `glob` over source: not the move. `search` and `find_usages` resolve symbol kinds, imports, and call sites; a text scan cannot rank its hits and misses re-exports, aliases, and dynamic dispatch.\n\nIf you catch yourself thinking one of these, that is the signal to switch:\n- \"I already know the path, so one read is cheaper than a lookup.\" — knowing the path does not shrink the file. The lookup returns the symbol; the read returns everything around it.\n- \"The read tool's description says to use it when I know the file.\" — it was written for hosts without a symbol index. This project has one.\n- \"Three of these calls versus one built-in call.\" — what costs is tokens returned into context, not calls issued. `batch` sends up to 10 as one request.\n- \"This is a quick check, not exploration.\" — a quick check on a 500-line file still costs 500 lines; `get_symbol` costs the symbol.\n- \"I read this file already, re-reading is free.\" — it is not; call `get_outline` for a structure reminder instead.\n\nWHEN TO USE trace-mcp tools (tool descriptions carry the details):\n\nNavigation & search:\n- Find a function/class/method → `search` (add `fusion=true` for best ranking; `implements`/`extends` filter by interface)\n- Understand a file before editing → `get_outline`\n- Read one symbol's source → `get_symbol`\n- A symbol plus its imports → `get_context_bundle`\n- Quick keyword context → `get_feature_context`\n- Starting a task → `get_task_context`\n\nRelationships & impact:\n- What breaks if I change X → `get_change_impact`\n- Who calls this / what it calls → `get_call_graph`\n- All usages of a symbol → `find_usages`\n\nToken optimization:\n- 2+ independent queries → `batch` ({ calls: [{ tool, args }, ...] }), up to 10 per request\n- `get_task_context` replaces spawning a subagent to explore — same context, one call, inside a token budget\n- Check waste → `get_optimization_report`; track savings → `get_session_stats`, `get_real_savings`\n\nEditing:\n- After every Edit/Write → `register_edit` { file_path } (reindexes just that file). If the reply carries `_duplication_warnings`, review them before continuing.\n\nAnything not listed above is deferred, not missing: `load_tools` registers a tool for direct calls, `batch` dispatches one by name without registering it.\nStart with `get_project_map` (summary_only=true) to orient yourself.","protocolVersion":"2025-11-25","serverInfo":{"description":"Precomputed code graph for AI agents: symbol search, file outlines, call graphs, and change-impact analysis, served instead of raw file reads. Not a distributed-tracing or logging server.","name":"trace","title":"Trace — Code Intelligence","version":"3.44.0","websiteUrl":"https://trace-mcp.com"}}}}
{"at":"2026-11-23T00:39:20.504Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T00:39:20.504Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T00:39:20.517Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get index status, statistics, health, and pipeline progress (indexing, summarization, embedding). Includes the session projectRoot; when the index is empty, next_steps names the empty root and points at list_projects + call_project_tool for other registered projects. Read-only, no side effects. Use to verify the index is ready before running queries. Returns JSON: { status, stats, projectRoot, next_steps?, config, warnings, pipelineProgress, embedding }.","inputSchema":{"properties":{},"type":"object"},"name":"get_index_health"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Notify trace-mcp that a file was edited. Reindexes the single file and invalidates search caches. Call after Edit/Write to keep index fresh — much lighter than full reindex. Also flags duplicate symbols — if `_duplication_warnings` appears, you may be recreating existing logic; review them. Each one is reported once per file, not on every edit; `check_duplication` re-asks. Mutates the index; idempotent. Returns JSON: { status, file, totalFiles, indexed, _duplication_warnings? }.","inputSchema":{"properties":{"file_path":{"description":"Relative path to the edited file","maxLength":512,"minLength":1,"type":"string"}},"required":["file_path"],"type":"object"},"name":"register_edit"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get project overview: detected frameworks, languages, file counts, structure. Read-only, no side effects. Call with summary_only=true at session start to orient yourself before diving into code. Use instead of manual ls/find. Returns JSON: { frameworks, languages, fileCount, symbolCount, structure }.","inputSchema":{"properties":{"summary_only":{"description":"Return only framework list + counts (default false)","type":"boolean"}},"type":"object"},"name":"get_project_map"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Search symbols by name, kind, or text. Use instead of Grep for functions, classes, methods, variables. For raw text/comment search use search_text; for references to a known symbol use find_usages. Read-only. Returns JSON: { items: [{ symbol_id, name, kind, fqn, signature, file, line, score }], total, search_mode } — mode-specific shape when mode!=single. Supports `output_format: \"toon\"`.","inputSchema":{"properties":{"decorator":{"description":"Filter to symbols carrying this decorator/annotation/attribute","maxLength":256,"type":"string"},"detail_level":{"description":"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\".","enum":["minimal","default","full"],"type":"string"},"drill_from":{"description":"[mode=\"drill\"] File path or symbol_id to restrict results to.","maxLength":512,"type":"string"},"extends":{"description":"Filter to classes/interfaces extending this name","maxLength":256,"type":"string"},"file_pattern":{"description":"Filter by file path pattern","maxLength":512,"type":"string"},"fusion":{"description":"Enable Signal Fusion — WRR ranking across lexical, structural, similarity, and identity channels. Weights come from `tune_weights`.","type":"boolean"},"fuzzy":{"description":"Typo-tolerant search. Auto-enabled when exact search returns 0 results.","type":"boolean"},"fuzzy_threshold":{"description":"[fuzzy] Min trigram similarity (default 0.3)","maximum":1,"minimum":0,"type":"number"},"implements":{"description":"Filter to classes implementing this interface","maxLength":256,"type":"string"},"kind":{"description":"Filter by symbol kind (class, method, function, etc.)","maxLength":64,"type":"string"},"language":{"description":"Filter by language","maxLength":64,"type":"string"},"limit":{"description":"Max results (default 20)","maximum":500,"minimum":1,"type":"integer"},"max_edit_distance":{"description":"[fuzzy] Max edit distance (default 3)","maximum":10,"minimum":1,"type":"integer"},"mode":{"description":"single (default): top-K. tiered: high/medium/low buckets. drill: scoped to drill_from. flat: raw FTS. get: exact lookup. Omit to auto-pick.","enum":["single","tiered","drill","flat","get"],"type":"string"},"offset":{"description":"Offset for pagination","maximum":50000,"minimum":0,"type":"integer"},"output_format":{"description":"\"json\" (default) or \"toon\" (lossless, 30-60% fewer tokens). \"markdown\" behaves as json here.","enum":["json","markdown","toon"],"type":"string"},"query":{"description":"Search query","maxLength":500,"minLength":1,"type":"string"},"retriever":{"description":"Run one named retrieval algorithm instead of the mode dispatcher. Ignores mode/filters/fuzzy/fusion.","enum":["lexical","semantic","hybrid","summary","feeling_lucky","graph_completion"],"type":"string"},"semantic":{"description":"auto (default): hybrid if AI available. on: force hybrid. off: lexical-only. only: pure vector. Non-\"off\" needs an AI provider.","enum":["auto","on","off","only"],"type":"string"},"semantic_weight":{"description":"[semantic] 0 = lexical only, 0.5 = balanced (default), 1 = vector only.","maximum":1,"minimum":0,"type":"number"}},"required":["query"],"type":"object"},"name":"search"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Onboarding helper: shows top imported files, most connected symbols (PageRank), language stats, and example tool calls. Call this first when exploring an unfamiliar project. For a structured project map use get_project_map instead. Read-only. Returns JSON: { topFiles, topSymbols, languageStats, exampleQueries }.","inputSchema":{"properties":{},"type":"object"},"name":"suggest_queries"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Look up a symbol by symbol_id or FQN and return its source code. Use instead of Read when you need one specific function/class/method — returns only the symbol, not the whole file. For multiple symbols at once, prefer get_context_bundle. Read-only. Returns JSON: { symbol_id, name, kind, fqn, signature, file, line_start, line_end, source }.","inputSchema":{"properties":{"fqn":{"description":"The fully qualified name to look up","maxLength":512,"type":"string"},"max_lines":{"description":"Truncate source to this many lines (omit for full source)","maximum":10000,"minimum":1,"type":"integer"},"symbol_id":{"description":"The symbol_id to look up","maxLength":512,"type":"string"},"verify_against_git":{"description":"Compare the indexed source against the current git HEAD slice; mismatches set `git_mismatch: true` in the response (index may be stale). Read-only. Silently skipped when git is unavailable or the file is untracked.","type":"boolean"}},"type":"object"},"name":"get_symbol"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get all symbols for a file (signatures only, no bodies) — cheaper than Read for understanding a file before editing. Follow up with get_symbol to read one symbol's source. `nested: true` expands large top-level symbols (default ≥100 LOC) into inner declarations, each carrying `parentId` + `depth` (max 3). Accepts project-relative or absolute file paths. For files in other registered projects, use call_project_tool. Read-only. Returns JSON: { path, language, symbols: [{ symbolId, name, kind, signature, lineStart, lineEnd, parentId?, depth? }] }. Supports `output_format: \"toon\"`.","inputSchema":{"properties":{"detail_level":{"description":"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\".","enum":["minimal","default","full"],"type":"string"},"min_loc_for_nesting":{"description":"Minimum (line_end - line_start) for a top-level symbol to be expanded when nested=true. Default 100.","maximum":10000,"minimum":10,"type":"integer"},"nested":{"description":"Walk the body of each top-level symbol past min_loc_for_nesting and emit inner declarations as extra rows carrying `parentId` + `depth`. Default false.","type":"boolean"},"output_format":{"description":"\"json\" (default) or \"toon\" (lossless, 30-60% fewer tokens). \"markdown\" is unsupported here and behaves as json.","enum":["json","markdown","toon"],"type":"string"},"path":{"description":"Relative file path from project root (or absolute path)","maxLength":512,"type":"string"}},"required":["path"],"type":"object"},"name":"get_outline"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Full change impact report: risk score + mitigations, breaking change detection, enriched dependents (complexity, coverage, exports), module groups, affected tests, co-change hidden couplings. Pass symbol_ids to scope to changed symbols. Use before modifying code. For a quick risk score alone use assess_change_risk; for who-calls-what use get_call_graph. compact pages results; bundle recalls. Read-only. Returns JSON: { risk, dependents, affectedTests, breakingChanges, totalAffected }.","inputSchema":{"properties":{"bundle":{"description":"Handle; @N = page N.","type":"string"},"compact":{"description":"Paged recall (opt-in).","type":"boolean"},"decorator_filter":{"description":"Filter dependents to only those with this decorator/annotation/attribute (e.g. \"Route\", \"Transactional\", \"csrf_protect\")","maxLength":256,"type":"string"},"depth":{"description":"Max traversal depth (default 3)","maximum":20,"minimum":1,"type":"integer"},"file_path":{"description":"Relative file path to analyze","maxLength":512,"type":"string"},"fqn":{"description":"Fully qualified name to analyze (alternative to symbol_id)","maxLength":512,"type":"string"},"max_dependents":{"description":"Cap on returned dependents (default 200)","maximum":5000,"minimum":1,"type":"integer"},"symbol_id":{"description":"Symbol ID to analyze","maxLength":512,"type":"string"},"symbol_ids":{"description":"Diff-aware: only analyze impact of these specific symbols (e.g. from get_changed_symbols)","items":{"maxLength":512,"type":"string"},"maxItems":50,"type":"array"}},"type":"object"},"name":"get_change_impact"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Get a symbol's source code + its import dependencies + optional callers, packed within a token budget. Supports batch queries with shared-import deduplication. Use instead of chaining get_symbol calls. For a single symbol without imports, use get_symbol — lighter. Read-only. Returns JSON: { primary: [{ symbol_id, file, source }], imports: [{ file, source }], token_usage }.","inputSchema":{"properties":{"fqn":{"description":"Alternative: look up by FQN","maxLength":512,"type":"string"},"include_callers":{"description":"Include who calls these symbols (default false)","type":"boolean"},"output_format":{"description":"Output format (default json).","enum":["json","markdown"],"type":"string"},"symbol_id":{"description":"Single symbol ID","maxLength":512,"type":"string"},"symbol_ids":{"description":"Batch: multiple symbol IDs","items":{"maxLength":512,"type":"string"},"maxItems":20,"type":"array"},"token_budget":{"description":"Max tokens (default 8000)","maximum":100000,"minimum":100,"type":"integer"}},"type":"object"},"name":"get_context_bundle"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Search code by keyword/topic → returns ranked source snippets within a token budget. Use when you need to READ actual code for a concept or feature. For structured task context with tests and entry points use get_task_context instead; for symbol metadata without source use search. Read-only. Returns JSON (default) or Markdown: { items: [{ symbol_id, name, file, source, score }], token_usage } | { content: \"...markdown...\" }. Supports `output_format: \"toon\"`. Capped by `memory.recall.timeoutMs` (default 5000ms); on timeout returns `{ items: [], token_usage, degraded: true }`.","inputSchema":{"properties":{"description":{"description":"Natural language description of the feature to find context for","maxLength":2000,"minLength":1,"type":"string"},"detail_level":{"description":"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\".","enum":["minimal","default","full"],"type":"string"},"output_format":{"description":"\"json\" (default, structured items), \"markdown\" (fenced code blocks, ~15-20% cheaper), or \"toon\" (lossless, 30-60% fewer tokens).","enum":["json","markdown","toon"],"type":"string"},"token_budget":{"description":"Max tokens for assembled context (default 4000)","maximum":100000,"minimum":100,"type":"integer"}},"required":["description"],"type":"object"},"name":"get_feature_context"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"All-in-one context for starting a dev task: execution paths, tests, entry points, adapted by task type. Use as your FIRST call when beginning any new task — replaces manual chaining of search → get_symbol → Read. For narrower feature-code lookup use get_feature_context instead. Read-only. Returns JSON (default) or Markdown.","inputSchema":{"properties":{"detail_level":{"description":"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\".","enum":["minimal","default","full"],"type":"string"},"focus":{"description":"Context strategy: minimal (fast, essential only), broad (default, wide net), deep (follow full execution chains)","enum":["minimal","broad","deep"],"type":"string"},"include_tests":{"description":"Include relevant test files (default true)","type":"boolean"},"output_format":{"description":"\"json\" (default, structured fields) or \"markdown\" (single LLM-optimized document with code fences, ~15-20% cheaper).","enum":["json","markdown"],"type":"string"},"task":{"description":"Natural language description of the task","maxLength":2000,"minLength":1,"type":"string"},"token_budget":{"description":"Max tokens (default 8000)","maximum":100000,"minimum":100,"type":"integer"}},"required":["task"],"type":"object"},"name":"get_task_context"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Find all references to a symbol or file (imports, calls, renders, dispatches). Use instead of Grep for symbol usages — semantic, not text matches. For raw text use search_text; for a bidirectional call graph use get_call_graph. Weakly-grounded `text_matched` edges into a name-colliding target are dropped by default (phantom god-node filter); `include_ambiguous_text_matched: true` keeps them. Read-only. Returns JSON: { references: [{ edge_type, resolution_tier, file, symbol }], total, truncated?, ambiguous_filtered? } — page caps at 50, `total` counts all.","inputSchema":{"properties":{"detail_level":{"description":"Output verbosity. \"minimal\" saves ~40-60% tokens (drops scores, fqn, signatures, summaries). Use to pick a candidate before get_symbol. Default: \"default\".","enum":["minimal","default","full"],"type":"string"},"file_path":{"description":"File path to find references for","maxLength":512,"type":"string"},"fqn":{"description":"Fully qualified name to find references for","maxLength":512,"type":"string"},"include_ambiguous_text_matched":{"description":"Keep text_matched edges whose target name collides with >=3 other symbols (default false — they produce phantom god-nodes).","type":"boolean"},"limit":{"description":"Max references returned (default 50).","maximum":1000,"minimum":1,"type":"integer"},"symbol_id":{"description":"Symbol ID to find references for","maxLength":512,"type":"string"}},"type":"object"},"name":"find_usages"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Build a bidirectional call graph centered on a symbol (who calls it + what it calls). Each branch keeps its direction: depth 2 = callers of callers, callees of callees. Use to understand control flow through a function. For flat list of all references use find_usages instead. Read-only. Returns JSON: { root: { symbol_id, name, calls: [...], called_by: [...] } }.","inputSchema":{"properties":{"depth":{"description":"Traversal depth on each side (default 2)","maximum":20,"minimum":1,"type":"integer"},"fqn":{"description":"Fully qualified name to center the graph on","maxLength":512,"type":"string"},"symbol_id":{"description":"Symbol ID to center the graph on","maxLength":512,"type":"string"}},"type":"object"},"name":"get_call_graph"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Full-text search across all indexed files. Supports regex, glob file patterns, language filter. Use for finding strings, comments, TODOs, config values, error messages — anything not captured as a symbol. Skips .env files: secret values are never searched or returned, use get_env_vars for env keys. For symbol search (functions, classes) use search instead. Read-only. Returns JSON: { files: [{ file, language, hits: [{ line, column, match, context }] }], total_matches } — hits grouped per file, so a long path is paid once. Pass `grouping: \"flat\"` for the ungrouped matches[] shape.","inputSchema":{"properties":{"case_sensitive":{"description":"Case-sensitive search (default false)","type":"boolean"},"context_lines":{"description":"Lines of context before/after each match (default 0 — set higher if you need surrounding code)","maximum":10,"minimum":0,"type":"integer"},"file_pattern":{"description":"Glob filter, e.g. \"src/**/*.ts\"","maxLength":512,"type":"string"},"grouping":{"default":"by_file","description":"Payload shape. \"by_file\" (default) groups hits per file, so a long path is paid once; \"flat\" is a single matches[] array.","enum":["flat","by_file"],"type":"string"},"is_regex":{"description":"Treat query as regex (default false)","type":"boolean"},"language":{"description":"Filter by language (e.g. \"typescript\", \"python\")","maxLength":64,"type":"string"},"max_results":{"description":"Max matches to return (default 50)","maximum":200,"minimum":1,"type":"integer"},"query":{"description":"Search string or regex pattern","maxLength":1000,"minLength":1,"type":"string"},"timeout_ms":{"description":"Wall-clock budget in ms — caps a catastrophic-backtracking regex. Default 2000; 0 disables.","maximum":30000,"minimum":0,"type":"integer"}},"required":["query"],"type":"object"},"name":"search_text"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Execute type-checker (tsc, mypy, pyright) and map errors to enclosing AST symbols. Read-only.","inputSchema":{"properties":{"checker":{"description":"Checker (tsc, mypy, pyright)","enum":["tsc","mypy","pyright"],"type":"string"},"file_path":{"description":"Filter by file path","maxLength":512,"type":"string"},"max_files":{"description":"Max files reported","maximum":9007199254740991,"minimum":1,"type":"integer"},"max_per_file":{"description":"Max errors per file","maximum":9007199254740991,"minimum":1,"type":"integer"},"reduce_output":{"description":"Shrink long output to a receipt","type":"boolean"},"timeout_ms":{"description":"Timeout in ms","maximum":9007199254740991,"minimum":1,"type":"integer"}},"type":"object"},"name":"get_diagnostics"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Mine Claude Code / Claw Code session logs for architectural decisions, tech choices, bug root causes, and preferences. Strategies: \"regex\" (default, free, ~20-40% recall), \"llm\" (higher recall, costs tokens), \"hybrid\" (regex + LLM safety net). Skips already-mined sessions unless force=true. Mutates the decision store; idempotent. Returns JSON: { mined, decisions_extracted, sessions_processed, strategy?, llm_sessions?, llm_decisions_extracted? }.","inputSchema":{"properties":{"force":{"description":"Re-mine already processed sessions (default: false)","type":"boolean"},"incremental_cursor":{"description":"Per-call override for `memory.mining.incrementalCursor`. true (default) reuses byte-offset cursors for appended turns; false falls back to legacy mined/unmined semantics.","type":"boolean"},"min_confidence":{"description":"Legacy reject floor — drops decisions below this. Superseded by reject_threshold; kept for back-compat.","maximum":1,"minimum":0,"type":"number"},"project_root":{"description":"Only mine sessions for this project path (default: all projects)","maxLength":1024,"type":"string"},"reject_threshold":{"description":"Reject floor (default: config decisions.reject_threshold, fallback 0.45). Decisions in [reject_threshold, review_threshold) queue for review; below it, dropped.","maximum":1,"minimum":0,"type":"number"},"review_threshold":{"description":"Auto-approve cutoff (default: config decisions.review_threshold, fallback 0.75). Decisions ≥ this enter the active graph immediately.","maximum":1,"minimum":0,"type":"number"},"strategy":{"description":"Extraction strategy: regex (default, free/fast/low recall), llm (AI provider, costs tokens, higher recall), hybrid (regex + LLM safety net). Falls back to regex with a warning if no AI provider is configured.","enum":["regex","llm","hybrid"],"type":"string"}},"type":"object"},"name":"mine_sessions"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Live agent write into the decision knowledge graph. Confidence-scores the input and routes it through the memoir review queue: high-confidence rows enter the active graph immediately, mid-confidence rows queue for human approval, low-confidence rows are dropped without persistence. Per-session dedup + rate-limit. Use during a session to capture decisions in real time. For manual high-confidence writes use add_decision; for post-hoc extraction from session logs use mine_sessions. Returns JSON: { id, review_status, confidence, deduplicated? }.","inputSchema":{"properties":{"content":{"description":"Full decision text — reasoning, context, tradeoffs","maxLength":5000,"minLength":1,"type":"string"},"file_path":{"description":"File path this decision is about","maxLength":1024,"type":"string"},"git_branch":{"anyOf":[{"maxLength":256,"type":"string"},{"type":"null"}],"description":"Git branch this decision belongs to. Omit to auto-detect, or pass null to make it branch-agnostic."},"service_name":{"description":"Subproject name this decision is about (e.g., \"auth-api\", \"user-service\")","maxLength":256,"type":"string"},"session_id":{"description":"Session identifier for dedup/rate-limit (default: \"_default\")","maxLength":256,"type":"string"},"symbol_id":{"description":"Symbol FQN this decision is about (e.g., \"src/auth/provider.ts::AuthProvider#class\")","maxLength":512,"type":"string"},"tags":{"description":"Tags for categorization (e.g., [\"auth\", \"security\"])","items":{"maxLength":64,"type":"string"},"maxItems":20,"type":"array"},"title":{"description":"Short summary of the decision","maxLength":200,"minLength":1,"type":"string"},"type":{"description":"Decision type","enum":["architecture_decision","tech_choice","bug_root_cause","preference","tradeoff","discovery","convention"],"type":"string"}},"required":["title","content","type"],"type":"object"},"name":"remember_decision"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Query the decision knowledge graph. Filter by type, subproject, code symbol, file path, tag, or time — answers \"why was this architecture chosen?\" with the actual decision record. Defaults to approved decisions; use include_pending or review_status for other tiers. Read-only. Returns JSON: { decisions: [{ id, title, type, content, tags, review_status, cluster_ids? }], clusters_summary?, total_results }. Supports `output_format: \"toon\"`.","inputSchema":{"properties":{"as_of":{"description":"Only decisions active at this ISO timestamp","maxLength":30,"type":"string"},"file_path":{"description":"Filter by linked file path","maxLength":1024,"type":"string"},"git_branch":{"description":"Branch filter: \"current\" (default), \"all\", or a branch name","maxLength":256,"type":"string"},"include_invalidated":{"description":"Include invalidated decisions (default: false)","type":"boolean"},"include_pending":{"description":"Also return pending review-queue decisions (default: approved only)","type":"boolean"},"index_only":{"description":"Omit full `content` (default false) — pick ids cheaply, then pull content with `get_decision`","type":"boolean"},"limit":{"description":"Max results (default: 50)","maximum":100,"minimum":1,"type":"integer"},"order_by":{"description":"Result ordering: \"recency\" (default), \"created_at\", or \"heat\" (popular + fresh; falls back to recency when disabled)","enum":["recency","heat","created_at"],"type":"string"},"output_format":{"description":"Output format: \"json\" (default), \"markdown\" (tool-specific), or \"toon\" (30-60% fewer tokens on tabular data).","enum":["json","markdown","toon"],"type":"string"},"review_status":{"description":"Restrict to one review tier (\"pending\" = review queue; overrides default)","enum":["pending","approved","rejected"],"type":"string"},"search":{"description":"Full-text search query (FTS5 with porter stemming)","maxLength":500,"type":"string"},"service_name":{"description":"Filter by subproject name (e.g., \"auth-api\")","maxLength":256,"type":"string"},"symbol_id":{"description":"Filter by linked symbol FQN","maxLength":512,"type":"string"},"tag":{"description":"Filter by tag","maxLength":64,"type":"string"},"type":{"description":"Filter by decision type","enum":["architecture_decision","tech_choice","bug_root_cause","preference","tradeoff","discovery","convention"],"type":"string"},"verification":{"description":"Filter by verification verdict (implies verify=true): \"stale\" or \"ok\"","enum":["ok","symbol_missing","code_changed","stale"],"type":"string"},"verify":{"description":"Verify linked code is still fresh (default true); stale rows are flagged `stale: true`. false skips the check.","type":"boolean"}},"type":"object"},"name":"query_decisions"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Mark a decision as no longer valid. The decision remains in the knowledge graph for historical queries but is excluded from active queries. Use when a decision is superseded or reversed. Mutates the decision store; idempotent. Returns JSON: { invalidated: { id, title, valid_until } }.","inputSchema":{"properties":{"id":{"description":"Decision ID to invalidate","maximum":9007199254740991,"minimum":1,"type":"integer"},"valid_until":{"description":"ISO timestamp when decision became invalid (default: now)","maxLength":30,"type":"string"}},"required":["id"],"type":"object"},"name":"invalidate_decision"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Show active tool preset, available presets, which tools are registered in this session, and which are deferred (loadable via load_tools). Read-only. Returns JSON: { active_preset, registered_tools, tool_names, available_presets, deferred_tools }.","inputSchema":{"properties":{},"type":"object"},"name":"get_preset_info"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Load tools this session's preset deferred, by preset name and/or explicit tool names. Call with no arguments to list what is deferred. Emits notifications/tools/list_changed and returns the loaded tools' schemas, so they are usable even if your client ignores that notification (call them through `batch`). Returns JSON: { loaded, already_loaded, unknown, blocked, tools, hint }.","inputSchema":{"properties":{"preset":{"description":"Preset whose members to load (minimal, standard, review, architecture, full). \"full\" loads everything deferred.","maxLength":64,"type":"string"},"tools":{"description":"Explicit tool names to load. Unions with `preset` when both are given.","items":{"maxLength":128,"minLength":1,"type":"string"},"maxItems":200,"type":"array"}},"type":"object"},"name":"load_tools"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Analyze AI agent session logs: token usage, prompt-cache hit rate (blended and split by provider/model), cost breakdown by tool/server, top files, models used. Parses Claude Code JSONL logs automatically. Read-only. For waste detection use get_optimization_report; for cost trends use get_usage_trends. Returns JSON: { sessionsCount, totals, cacheHitRate: { blended, byModel, byProvider }, byToolServer, topTools, topFiles, modelsUsed }.","inputSchema":{"properties":{"period":{"description":"Time period (default: week)","enum":["today","week","month","all"],"type":"string"},"session_id":{"description":"Specific session ID to analyze","maxLength":128,"type":"string"}},"type":"object"},"name":"get_session_analytics"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Detect token waste patterns in AI agent sessions: repeated file reads, Bash grep instead of search, large file reads, unused trace-mcp tools. Provides savings estimates. Read-only. For usage/cost overview use get_session_analytics; for A/B savings comparison use get_real_savings. Returns JSON: { patterns: [{ type, description, savings_estimate }], total_waste }.","inputSchema":{"properties":{"period":{"description":"Time period (default: week)","enum":["today","week","month","all"],"type":"string"}},"type":"object"},"name":"get_optimization_report"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Technology profile of the project: detected frameworks/ORMs/UI libs from manifests (package.json, composer.json, etc.), which are covered by trace-mcp plugins, and coverage gaps. Read-only. Returns JSON: { detected, covered, gaps }.","inputSchema":{"properties":{},"type":"object"},"name":"get_coverage_report"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"A/B comparison: how many tokens could be saved by using trace-mcp instead of raw Read/Bash file reads. Per-file breakdown. Read-only. For pattern-based waste detection use get_optimization_report instead. Returns JSON: { files: [{ file, raw_tokens, compact_tokens, savings }], total_savings }.","inputSchema":{"properties":{"period":{"description":"Time period (default: week)","enum":["today","week","month","all"],"type":"string"}},"type":"object"},"name":"get_real_savings"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Daily token usage time-series: sessions, tokens, estimated cost, tool calls, prompt-cache hit rate per day. For spotting cost spikes. Read-only. For detailed session breakdown use get_session_analytics instead. Returns JSON: { days, daily: [{ date, sessions, tokens, cost_usd, tool_calls, cache_hit_rate, cache_hit_rate_by_provider }], totals }.","inputSchema":{"properties":{"days":{"description":"Number of days to show (default: 30)","maximum":365,"minimum":1,"type":"integer"}},"type":"object"},"name":"get_usage_trends"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Token savings stats for this session: per-tool call counts, estimated token savings, reduction percentage, dedup savings, and per-tool latency (p50/p95/max/error_rate). Read-only. Returns JSON: { session: { ..., latency_per_tool }, cumulative, dedup_saved_tokens, report }.","inputSchema":{"properties":{},"type":"object"},"name":"get_session_stats"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Opening-move router for new tasks. Combines BM25/PageRank search + session journal (negative evidence + focus signals) + framework-aware insertion-point suggestions + change-risk + turn-budget advisor into ONE call. Returns verdict (exists/partial/missing/ambiguous), confidence, ranked targets with provenance, scaffold hints when missing, and recommended next tool calls. Call this FIRST on a new task to break the empty-result hallucination chain. Read-only. For broader task context with source code use get_task_context instead. Returns JSON: { verdict, confidence, targets, scaffoldHints, nextSteps }.","inputSchema":{"properties":{"intent":{"description":"Optional intent hint; auto-classified from task if omitted","enum":["bugfix","new_feature","refactor","understand"],"type":"string"},"max_targets":{"description":"Cap on returned targets (default 5)","maximum":20,"minimum":1,"type":"integer"},"skip_risk":{"description":"Skip change-risk assessment for the top target (default false)","type":"boolean"},"task":{"description":"Natural-language task description (e.g. \"add a webhook endpoint for stripe payments\")","maxLength":512,"minLength":1,"type":"string"}},"required":["task"],"type":"object"},"name":"plan_turn"},{"_meta":{"anthropic/alwaysLoad":true},"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Execute multiple trace-mcp tools in a single MCP request. Dispatches any registered tool by name, including tools this session's preset defers — so a deferred tool is callable here without a load_tools round-trip (tools.exclude stays a hard restriction). Use to reduce round-trips when you need several independent queries (e.g., get_outline for 3 files, or search + get_symbol together). Read-only (delegates to other tools). Returns JSON: { batch_results: [{ tool, result }], total }.","inputSchema":{"properties":{"calls":{"description":"Array of tool calls to execute (max 10)","items":{"properties":{"args":{"additionalProperties":{},"description":"Tool arguments","propertyNames":{"type":"string"},"type":"object"},"tool":{"description":"Tool name (e.g., \"get_outline\", \"get_symbol\", \"search\")","type":"string"}},"required":["tool","args"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"}},"required":["calls"],"type":"object"},"name":"batch"}]}}}
