{"at":"2026-11-23T02:19:23.763Z","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-23T02:19:24.794Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T02:19:27.923Z","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-23T02:19:28.831Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"completions":{},"logging":{},"prompts":{"listChanged":true},"resources":{"listChanged":true},"tools":{"listChanged":true}},"instructions":"Nanostores tool results expose structural signals — hub scores, subscriber counts, mutator counts, chain depth, co-occurring pairs, and store flags. Use them to identify which stores warrant investigation.\n\nStore flags (computedHasSideEffects, computedHasCleanupCalls, isInsideFactory, readViaGetOnly, storyOrTestOnlyWriter, etc.) are observational signals, not conclusions.\nUse them to prioritize investigation. Validate with source code or additional structural evidence before making a strong claim.\nIf not validated, present as a possibility — not as a finding.\n\nFor each store you investigate, Read the source file before stating findings:\n1. Use structural signals to form a hypothesis about the store's role and usage pattern\n2. Read the source file — understand what the store does in this project and whether the nanostores patterns used are appropriate for that purpose\n3. State what the structure reveals, what the source confirms or contradicts, and what their combination means for the codebase\n\nWhen runtime data is available, use it to validate and extend static findings:\n1. For each store flagged by nanostores_find_noisy_stores or nanostores_runtime_overview: call nanostores_store_activity to get the event sequence\n2. Distinguish externally triggered changes (user action → store change) from cascades (upstream source → this store via derives_from) — use storeImpact to trace the upstream root\n3. For stores with actionsErrored > 0: read the error message in nanostores_store_activity events and the action handler source — these are bugs, not structural issues\n4. Connect change frequency to user-visible behavior: what user gesture or async event triggers these changes?\n5. State findings as: \"[Store] updates [N times per user gesture / per session] because [trigger]. This [is expected / suggests: batching, derived store, or finer-grained split].\"\n\nDocs are available via nanostores_docs_search — use them to verify whether the patterns and store types you identify match recommended nanostores usage and to check for better alternatives.\n\nAvailable tools:\n1. Static analysis:\n   - nanostores_scan_project — discovers stores and dependency graph\n   - nanostores_store_summary — inspects individual stores\n   - nanostores_project_outline — quick high-level overview\n   - nanostores_store_subgraph — neighborhood around a specific store (BFS, both directions)\n   - nanostores_store_impact — causal impact chain: what recomputes if X changes?\n2. Runtime monitoring (active):\n   - nanostores_runtime_overview — health overview\n   - nanostores_store_activity — per-store events\n   - nanostores_find_noisy_stores — performance hotspots\n   - nanostores_runtime_coverage — static vs runtime store comparison\n3. Documentation:\n   - nanostores_docs_search — guides and API references\n\nTool selection heuristics:\n- For topology / architecture questions (how is state structured, what depends on what): prefer graph-level tools first (nanostores_project_outline, nanostores_store_summary, nanostores_store_subgraph). Read source files only to validate or explain suspicious findings.\n- For causal questions (what recomputes when X changes, why does Y re-render): use nanostores_store_impact on the root store before reading source.\n- For dead code questions (unused stores): nanostores_project_outline unreferencedStores — treat signals (mutatorCount, sfcFileReferences, isPersistent) as hypotheses, not conclusions. Read the source file before concluding.\n- For unfamiliar codebases or broad scans: nanostores_scan_project({compact: true}) gives a directory-level overview without full store lists.\n- For performance questions (noisy updates, excess re-renders): nanostores_find_noisy_stores → nanostores_store_activity → nanostores_store_impact → read source. Distinguish cascades (upstream store → this store) from external triggers (user action → store).\n- For pattern questions (how to use X, is this idiomatic): nanostores_docs_search first, then apply to flagged stores.\n\nStructural signals:\n- chain depth: longer derives_from chains mean more downstream recalculation per change.\n- fan-in: computed stores that depend on many sources recalculate once per source change.\n- unreferencedStores in nanostores_project_outline: stores with no detected subscribers or derived dependents; includes mutatorCount, sfcFileReferences, and isPersistent signals.\n- coOccurringPairs in nanostores_project_outline: stores that consistently appear together in subscribers — candidates for consolidation or a shared derived store.\n\nSemantic flags on stores (appear in store_summary output under flags):\n- computedHasSideEffects: computed callback calls .set/.subscribe/setTimeout/etc — read source before assuming pure derivation.\n- computedHasCleanupCalls: computed callback calls .destroy() — typical lifecycle pattern, distinct from state mutation side effects.\n- isInsideFactory: store declared inside a function body — may be per-instance, not shared global state.\n- hasMountDependentActivation: onMount() detected — behavior only activates when the store has live subscribers.\n- writtenWithoutSubscribers: mutators exist but no reactive subscribers detected — may be imperative-only config, dead code, or subscribers hidden from static analysis (onMount, onSet, keepMount).\n- readViaGetOnly: only .get() calls detected, no useStore/subscribe — imperative access pattern. Not necessarily dead — could be a service or utility reading state outside the reactive graph.\n- storyOrTestOnlyWriter: all detected mutations come from test/story files — store is not written in production code. Strong signal for test-only or mock state.\n- runtime change ratio: leaf-computed change count vs root-source change count measures downstream recalculation amplification per upstream event.\n- stores in static graph not observed in runtime session: check with nanostores_runtime_coverage.\n- actionsErrored > 0: always investigate — get events from nanostores_store_activity and read the action handler source\n- mounts > 1 on a module-level store (atom/map): unusual, may indicate re-initialization or duplicate logger attachment\n\nStatic analysis blind spots — the scanner cannot detect these patterns. Adjust confidence accordingly:\n\nSubscriptions not detected:\n- onMount($store, callback) and onSet($store, callback): nanostores lifecycle hooks are not counted as subscribers. A store with zero detected subscribers may still be actively used via these hooks.\n- keepMount($store): forces a store to stay mounted; invisible to the subscriber graph.\n- $store.get() inside intervals or render loops counts as readViaGetOnly — polling-style reads are detected as imperative access but not as reactive subscriptions.\n\nStore declarations not detected:\n- Stores returned from factory functions and captured via destructuring: `const { $x } = createFoo()` — $x is not linked to the atom() call inside createFoo, so it will not appear in the store index.\n- atomFamily(id) and mapTemplate(id) call sites: each call creates a store instance at runtime, but instances are not tracked. Only the family/template declaration itself is indexed.\n- Dynamic imports: `await import('./stores')` — stores from async-loaded modules are not scanned.\n- CommonJS require(): `const { atom } = require('nanostores')` — only ESM import declarations are parsed.\n- Default import style: `import ns from 'nanostores'` is not recognized; only named imports and `import * as ns` are detected.\n\nDependency edges not detected:\n- atomFamily / mapTemplate / computedTemplate derives_from edges are intentionally excluded (incomplete dependency semantics). Chains passing through template stores are invisible.\n- onSet($a, () => $b.set(...)) reactive chains: side-effect-driven store-to-store dependencies do not appear as derives_from edges.\n\nMutation attribution gaps:\n- batch(() => { $a.set(); $b.set() }): individual .set() calls are detected, but the batch boundary is invisible — related mutations are not grouped.\n- Indirect mutations via wrapper functions: `function updateUser(v) { $user.set(v) }` — the call site of updateUser() is not attributed to $user.\nUse nanostores_runtime_coverage to cross-check: stores present at runtime but absent in the static index are likely factory-created or loaded dynamically.","protocolVersion":"2025-11-25","serverInfo":{"description":"Static AST analysis and optional runtime monitoring for Nanostores state management","name":"nanostores-mcp","version":"0.1.2"}}}}
{"at":"2026-11-23T02:19:28.831Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T02:19:28.831Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T02:19:28.838Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Returns the complete store/subscriber/relation index for the project. Use compact:true for a token-efficient directory-level overview (store counts by folder). Use the full mode (default) when you need to iterate over every entity or build a complete picture. Example: {compact: true} for directory overview, {force: true} to bypass cache.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"compact":{"description":"Return a compact directory-level summary instead of full store/subscriber lists. Use when you need a token-efficient overview of where stores live, not individual store details.","type":"boolean"},"force":{"description":"Force a fresh scan, bypassing the cache.","type":"boolean"},"rootUri":{"type":"string"}},"type":"object"},"name":"nanostores_scan_project","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"byDir":{"items":{"additionalProperties":false,"properties":{"dir":{"type":"string"},"mutatorCount":{"type":"number"},"storeCount":{"type":"number"},"storeKinds":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"subscriberCount":{"type":"number"}},"required":["dir","storeCount","subscriberCount","mutatorCount","storeKinds"],"type":"object"},"type":"array"},"errors":{"items":{"type":"string"},"type":"array"},"filesScanned":{"type":"number"},"mutators":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"},"storeIds":{"items":{"type":"string"},"type":"array"}},"required":["id","file","line","kind","storeIds"],"type":"object"},"type":"array"},"relations":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"from":{"type":"string"},"line":{"type":"number"},"to":{"type":"string"},"type":{"enum":["declares","subscribes_to","derives_from","mutates"],"type":"string"}},"required":["type","from","to"],"type":"object"},"type":"array"},"root":{"type":"string"},"stores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"}},"required":["id","file","line","kind"],"type":"object"},"type":"array"},"subscribers":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"},"storeIds":{"items":{"type":"string"},"type":"array"}},"required":["id","file","line","kind","storeIds"],"type":"object"},"type":"array"},"totals":{"additionalProperties":false,"properties":{"mutators":{"type":"number"},"relations":{"type":"number"},"stores":{"type":"number"},"subscribers":{"type":"number"}},"required":["stores","subscribers","mutators","relations"],"type":"object"}},"required":["root","filesScanned"],"type":"object"},"title":"Scan project for Nanostores usage"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this when you need details about a specific store — its kind, file location, direct subscribers, and first-level derived relations. Accepts store id or name. For multi-hop dependency chains use nanostores_store_subgraph instead. Example: {name: \"$counter\"} or {storeId: \"store:src/stores.ts#$counter\"}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"file":{"description":"Optional relative file path to disambiguate store name.","type":"string"},"name":{"description":"Store name. Used if storeId is not provided.","type":"string"},"rootUri":{"description":"Project root URI or path for multi-root setups; defaults to first root.","type":"string"},"storeId":{"description":"Exact store id. If provided, takes priority.","type":"string"}},"type":"object"},"name":"nanostores_store_summary","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"derivedDependents":{"additionalProperties":false,"properties":{"relations":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"from":{"type":"string"},"line":{"type":"number"},"to":{"type":"string"},"type":{"type":"string"}},"required":["from","to","type"],"type":"object"},"type":"array"},"stores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"}},"required":["id","file","line","kind"],"type":"object"},"type":"array"}},"required":["stores","relations"],"type":"object"},"derivesFrom":{"additionalProperties":false,"properties":{"relations":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"from":{"type":"string"},"line":{"type":"number"},"to":{"type":"string"},"type":{"type":"string"}},"required":["from","to","type"],"type":"object"},"type":"array"},"stores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"}},"required":["id","file","line","kind"],"type":"object"},"type":"array"}},"required":["stores","relations"],"type":"object"},"resolution":{"additionalProperties":false,"properties":{"by":{"enum":["id","name","id_tail"],"type":"string"},"note":{"type":"string"},"requested":{"type":"string"}},"required":["by","requested"],"type":"object"},"store":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"}},"required":["id","file","line","kind"],"type":"object"},"subscribers":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"line":{"type":"number"},"name":{"type":"string"},"storeIds":{"items":{"type":"string"},"type":"array"}},"required":["id","file","line","kind","storeIds"],"type":"object"},"type":"array"}},"required":["store","resolution","subscribers","derivesFrom","derivedDependents"],"type":"object"},"title":"Summarize a Nanostores store"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Use this when scan results seem stale or after making file changes that the server may not have detected. Clears the cached project index so the next nanostores_scan_project call performs a fresh scan.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"rootUri":{"description":"Workspace root to clear cache for. Omit to clear all roots.","type":"string"}},"type":"object"},"name":"nanostores_clear_cache","title":"Clear project analysis cache"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this for a quick overview of Nanostores usage in the project — store kind distribution, top directories, and hub stores ranked by connectivity. Returns a compact summary instead of full store/subscriber lists (same scan data, smaller response). Use nanostores_scan_project when you need the complete list of stores and relations.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"projectRoot":{"description":"Project root path (uses default if omitted)","type":"string"}},"type":"object"},"name":"nanostores_project_outline","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"coOccurringPairs":{"items":{"additionalProperties":false,"properties":{"count":{"type":"number"},"nameA":{"type":"string"},"nameB":{"type":"string"},"storeIdA":{"type":"string"},"storeIdB":{"type":"string"}},"required":["storeIdA","nameA","storeIdB","nameB","count"],"type":"object"},"type":"array"},"hubs":{"items":{"additionalProperties":false,"properties":{"derivedDependents":{"type":"number"},"file":{"type":"string"},"flags":{"additionalProperties":false,"properties":{"computedHasCleanupCalls":{"type":"boolean"},"computedHasSideEffects":{"type":"boolean"},"hasMountDependentActivation":{"type":"boolean"},"isInsideFactory":{"type":"boolean"},"readViaGetOnly":{"type":"boolean"},"storyOrTestOnlyWriter":{"type":"boolean"},"writtenWithoutSubscribers":{"type":"boolean"}},"type":"object"},"kind":{"type":"string"},"mutators":{"type":"number"},"mutatorsByKind":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"name":{"type":"string"},"score":{"type":"number"},"storeId":{"type":"string"},"subscribers":{"type":"number"},"subscribersByKind":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"}},"required":["storeId","name","score","subscribers","derivedDependents","mutators","subscribersByKind","mutatorsByKind"],"type":"object"},"type":"array"},"rootDir":{"type":"string"},"storeKinds":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"topBlindSpots":{"items":{"additionalProperties":false,"properties":{"blindSpotType":{"enum":["possibly_svelte_reactive","factory_local","story_or_test_scoped","imperative_only","truly_unreferenced_candidate"],"type":"string"},"file":{"type":"string"},"flags":{"additionalProperties":false,"properties":{"computedHasCleanupCalls":{"type":"boolean"},"computedHasSideEffects":{"type":"boolean"},"hasMountDependentActivation":{"type":"boolean"},"isInsideFactory":{"type":"boolean"},"readViaGetOnly":{"type":"boolean"},"storyOrTestOnlyWriter":{"type":"boolean"},"writtenWithoutSubscribers":{"type":"boolean"}},"type":"object"},"kind":{"type":"string"},"mutatorCount":{"type":"number"},"name":{"type":"string"},"sfcFileReferences":{"type":"number"},"storeId":{"type":"string"}},"required":["storeId","name","blindSpotType","mutatorCount","sfcFileReferences"],"type":"object"},"type":"array"},"topDirs":{"items":{"additionalProperties":false,"properties":{"dir":{"type":"string"},"files":{"type":"number"},"stores":{"type":"number"}},"required":["dir","stores","files"],"type":"object"},"type":"array"},"topSemanticAnomalies":{"items":{"additionalProperties":false,"properties":{"directSubscribers":{"type":"number"},"file":{"type":"string"},"flags":{"additionalProperties":false,"properties":{"computedHasCleanupCalls":{"type":"boolean"},"computedHasSideEffects":{"type":"boolean"},"hasMountDependentActivation":{"type":"boolean"},"isInsideFactory":{"type":"boolean"},"readViaGetOnly":{"type":"boolean"},"storyOrTestOnlyWriter":{"type":"boolean"},"writtenWithoutSubscribers":{"type":"boolean"}},"type":"object"},"kind":{"type":"string"},"mutators":{"type":"number"},"name":{"type":"string"},"score":{"type":"number"},"storeId":{"type":"string"}},"required":["storeId","name","score","directSubscribers","mutators","flags"],"type":"object"},"type":"array"},"totals":{"additionalProperties":false,"properties":{"filesWithStores":{"type":"number"},"stores":{"type":"number"},"subscribers":{"type":"number"}},"required":["stores","filesWithStores","subscribers"],"type":"object"},"unreferencedStores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"isPersistent":{"type":"boolean"},"kind":{"type":"string"},"mutatorCount":{"type":"number"},"mutatorsByKind":{"additionalProperties":{"type":"number"},"propertyNames":{"type":"string"},"type":"object"},"name":{"type":"string"},"sfcFileReferences":{"type":"number"},"storeId":{"type":"string"},"valueType":{"type":"string"}},"required":["storeId","name","mutatorCount","sfcFileReferences","isPersistent","mutatorsByKind"],"type":"object"},"type":"array"}},"required":["rootDir","totals","storeKinds","topDirs","hubs","unreferencedStores","coOccurringPairs","topSemanticAnomalies","topBlindSpots"],"type":"object"},"title":"Get project outline"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"If your question is 'what recomputes downstream when X changes?', use nanostores_store_impact instead — it gives the ordered causal chain in one call. Use this tool only when you need both directions: upstream sources AND downstream dependents together. Returns the BFS neighborhood within a configurable radius (default 2). Start with radius=1; increase only when you need wider structural context. On highly connected hub stores (score>5 in project_outline) radius=2+ may return most of the project. Example: {name: \"$cart\", radius: 1} or {storeId: \"store:src/stores.ts#$cart\", radius: 2}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"name":{"description":"Store name. Used if storeId is not provided.","type":"string"},"projectRoot":{"description":"Project root path (uses default if omitted)","type":"string"},"radius":{"default":2,"description":"BFS radius around the store (default 2)","maximum":10,"minimum":0,"type":"integer"},"storeId":{"description":"Exact store id. If provided, takes priority.","type":"string"}},"type":"object"},"name":"nanostores_store_subgraph","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"centerStoreId":{"type":"string"},"edges":{"items":{"additionalProperties":false,"properties":{"from":{"type":"string"},"to":{"type":"string"},"type":{"type":"string"}},"required":["from","to","type"],"type":"object"},"type":"array"},"nodes":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"type":{"enum":["store","file"],"type":"string"},"valueType":{"type":"string"}},"required":["id","type"],"type":"object"},"type":"array"},"radius":{"type":"number"},"summary":{"additionalProperties":false,"properties":{"dependencies":{"type":"number"},"edges":{"type":"number"},"nodes":{"type":"number"},"subscribers":{"type":"number"}},"required":["nodes","edges"],"type":"object"},"warning":{"type":"string"}},"required":["centerStoreId","radius","nodes","edges"],"type":"object"},"title":"Get store subgraph"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"When you need to trace what recomputes if X changes, call this once — not nanostores_store_summary on each downstream store. Returns the full ordered downstream chain in a single response: computed stores that depend on X at hop 1, their dependents at hop 2, and so on. Subscribers appear at the same hop as the store they react to. Use nanostores_store_subgraph instead when you also need upstream ancestors (BFS in both directions). Example: {name: \"$isLoggedIn\"} returns every computed store and subscriber that recomputes when $isLoggedIn changes, ordered by distance.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"name":{"description":"Store name. Used if storeId is not provided.","type":"string"},"projectRoot":{"description":"Project root path (uses default if omitted)","type":"string"},"storeId":{"description":"Exact store id. If provided, takes priority.","type":"string"}},"type":"object"},"name":"nanostores_store_impact","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"hops":{"items":{"additionalProperties":false,"properties":{"derivedStores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"valueType":{"type":"string"}},"required":["id","kind","file"],"type":"object"},"type":"array"},"hop":{"type":"number"},"subscribers":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"}},"required":["id","kind","file"],"type":"object"},"type":"array"}},"required":["hop","derivedStores","subscribers"],"type":"object"},"type":"array"},"sourceName":{"type":"string"},"sourceStoreId":{"type":"string"},"summary":{"additionalProperties":false,"properties":{"maxHops":{"type":"number"},"totalAffectedStores":{"type":"number"},"totalAffectedSubscribers":{"type":"number"}},"required":["totalAffectedStores","totalAffectedSubscribers","maxHops"],"type":"object"}},"required":["sourceStoreId","hops","summary"],"type":"object"},"title":"Get store impact chain"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this when you need to verify the MCP server is alive or check whether the runtime logger bridge is connected.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message":{"default":"pong","type":"string"}},"type":"object"},"name":"nanostores_ping","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"loggerBridge":{"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"error":{"type":"string"},"url":{"type":"string"}},"required":["enabled"],"type":"object"},"message":{"type":"string"}},"required":["message"],"type":"object"},"title":"Ping Nanostores MCP server"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this when debugging a specific store's runtime behavior — why it updates too often, what actions trigger changes, or whether it emits errors. Returns recent events, change frequency, action calls, and errors. Omit storeName to get activity across all stores. Example: {storeName: \"$cart\", kinds: [\"change\", \"action-error\"]} or {limit: 20, windowMs: 60000}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"actionName":{"description":"Filter events by action name","type":"string"},"kinds":{"description":"Filter events by kind(s)","items":{"enum":["mount","unmount","change","action-start","action-end","action-error"],"type":"string"},"minItems":1,"type":"array"},"limit":{"default":50,"description":"Max events to return","type":"number"},"projectRoot":{"description":"Project root path to link runtime data with static analysis","type":"string"},"storeName":{"description":"Store name to query (optional)","type":"string"},"windowMs":{"description":"Time window in milliseconds (from now back)","type":"number"}},"type":"object"},"name":"nanostores_store_activity","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"events":{"items":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"mount","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"unmount","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind"],"type":"object"},{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"args":{"items":{},"type":"array"},"kind":{"const":"action-start","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId","actionName"],"type":"object"},{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"kind":{"const":"action-end","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"}]},"type":"array"},"stats":{"anyOf":[{"anyOf":[{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},{"additionalProperties":false,"properties":{"lastEventAt":{"type":"number"},"sessionStartedAt":{"type":"number"},"stores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"},"totalEvents":{"type":"number"}},"required":["stores","totalEvents","sessionStartedAt","lastEventAt"],"type":"object"}]},{"type":"null"}]},"storeName":{"type":"string"},"summary":{"type":"string"}},"required":["stats","events","summary"],"type":"object"},"title":"Get store runtime activity"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this when investigating performance issues or excessive re-renders. Returns stores ranked by activity — frequent changes, many action calls — to pinpoint bottlenecks. Example: {limit: 10} or {windowMs: 30000, compact: true}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"compact":{"description":"Return TOON-encoded compact table for lower token cost","type":"boolean"},"limit":{"default":5,"description":"Number of stores to return","type":"number"},"windowMs":{"description":"Time window in milliseconds (from now back)","type":"number"}},"type":"object"},"name":"nanostores_find_noisy_stores","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"stores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"},"summary":{"type":"string"}},"required":["stores","summary"],"type":"object"},"title":"Find noisy stores"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Use this when you want a high-level health check of the running app's state management. Returns active stores, error-prone stores, unused stores, and activity patterns. Example: {} or {windowMs: 60000, compact: true}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"compact":{"description":"Return TOON-encoded compact table for lower token cost","type":"boolean"},"windowMs":{"description":"Time window in milliseconds (from now back)","type":"number"}},"type":"object"},"name":"nanostores_runtime_overview","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"errorProneStores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"},"noisyStores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"},"stats":{"additionalProperties":false,"properties":{"lastEventAt":{"type":"number"},"sessionStartedAt":{"type":"number"},"stores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"},"totalEvents":{"type":"number"}},"required":["stores","totalEvents","sessionStartedAt","lastEventAt"],"type":"object"},"summary":{"type":"string"},"unmountedStores":{"items":{"additionalProperties":false,"properties":{"actionsCompleted":{"type":"number"},"actionsErrored":{"type":"number"},"actionsStarted":{"type":"number"},"changes":{"type":"number"},"firstSeen":{"type":"number"},"lastChange":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"changed":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"kind":{"const":"change","type":"string"},"newValue":{},"oldValue":{},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"},"valueMessage":{"type":"string"}},"required":["storeName","timestamp","kind"],"type":"object"},"lastError":{"additionalProperties":false,"properties":{"actionId":{"type":"string"},"actionName":{"type":"string"},"error":{},"errorMessage":{"type":"string"},"kind":{"const":"action-error","type":"string"},"projectRoot":{"type":"string"},"sessionId":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"timestamp":{"type":"number"}},"required":["storeName","timestamp","kind","actionId"],"type":"object"},"lastSeen":{"type":"number"},"maxActionDurationMs":{"type":"number"},"minActionDurationMs":{"type":"number"},"mounts":{"type":"number"},"projectRoot":{"type":"string"},"storeId":{"type":"string"},"storeName":{"type":"string"},"totalActionDurationMs":{"type":"number"},"unmounts":{"type":"number"}},"required":["storeName","firstSeen","lastSeen","mounts","unmounts","changes","actionsStarted","actionsErrored","actionsCompleted","totalActionDurationMs","maxActionDurationMs","minActionDurationMs"],"type":"object"},"type":"array"}},"required":["summary","stats","noisyStores","errorProneStores","unmountedStores"],"type":"object"},"title":"Get runtime overview"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Compare static analysis graph with runtime event data to find stores declared in the static graph but not observed in this runtime session, and stores seen at runtime but absent from the static graph (dynamic or unscanned). Use after running the app to verify instrumentation completeness. Example: {} or {projectRoot: \"/path/to/project\"}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"projectRoot":{"description":"Project root path (uses first configured root if omitted)","type":"string"}},"type":"object"},"name":"nanostores_runtime_coverage","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"report":{"additionalProperties":false,"properties":{"coverageByKind":{"additionalProperties":{"additionalProperties":false,"properties":{"covered":{"type":"number"},"total":{"type":"number"}},"required":["total","covered"],"type":"object"},"propertyNames":{"type":"string"},"type":"object"},"coveredCount":{"type":"number"},"projectRoot":{"type":"string"},"runtimeOnlyCount":{"type":"number"},"runtimeStoreCount":{"type":"number"},"staticOnlyCount":{"type":"number"},"staticStoreCount":{"type":"number"},"stores":{"items":{"additionalProperties":false,"properties":{"file":{"type":"string"},"inRuntime":{"type":"boolean"},"inStaticGraph":{"type":"boolean"},"kind":{"type":"string"},"runtimeChanges":{"type":"number"},"runtimeMounts":{"type":"number"},"storeId":{"type":"string"},"storeName":{"type":"string"}},"required":["storeName","inStaticGraph","inRuntime"],"type":"object"},"type":"array"}},"required":["projectRoot","staticStoreCount","runtimeStoreCount","coveredCount","staticOnlyCount","runtimeOnlyCount","coverageByKind","stores"],"type":"object"},"summary":{"type":"string"}},"required":["summary","report"],"type":"object"},"title":"Runtime coverage report"},{"annotations":{"idempotentHint":true,"openWorldHint":false,"readOnlyHint":true},"description":"Find Nanostores documentation by topic or store kind. Use query for free-text search across guides, API references, and best practices. Use storeKind to get docs relevant to a specific store type (atom, map, computed, etc.). Combine both to search within store-relevant pages. To read full page content, use the nanostores://docs/page/{id} resource. Example: {query: \"persistent storage\"} or {storeKind: \"computed\"} or {query: \"batched\", storeKind: \"computed\"}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"limit":{"default":10,"description":"Maximum number of results","type":"number"},"query":{"description":"Search query for documentation. Required unless storeKind is provided.","type":"string"},"storeKind":{"description":"Find docs relevant to this store type. Can be used alone or with query.","enum":["atom","map","computed","persistentAtom","persistentMap","atomFamily","mapTemplate","computedTemplate","router","i18n","deepMap","unknown"],"type":"string"},"tags":{"description":"Filter by tags (e.g., ['react', 'persistent'])","items":{"type":"string"},"type":"array"}},"type":"object"},"name":"nanostores_docs_search","outputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","additionalProperties":false,"properties":{"query":{"type":"string"},"results":{"items":{"additionalProperties":false,"properties":{"headingPath":{"items":{"type":"string"},"type":"array"},"pageId":{"type":"string"},"score":{"type":"number"},"snippet":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["pageId","title","headingPath","snippet","score"],"type":"object"},"type":"array"},"storeKind":{"type":"string"}},"required":["results"],"type":"object"},"title":"Search Nanostores documentation"}]}}}
