Skip to main content
Glama
claude-continuity-mcp

claude-continuity-mcp

router_smart_read

Read-onlyIdempotent

Reads files locally while protecting Claude's context window: returns full content for small files, ranked exact snippets or outlines for large files, and unchanged status or diffs for prior reads.

Instructions

Lee un archivo protegiendo la ventana de contexto de Claude. 100% local y determinista.

  • Archivo chico (≤~6KB): lo devuelve entero, limpio y minificado.

  • Archivo grande + query: ranking local (BM25/embeddings) → devuelve SOLO los fragmentos exactos relevantes, con números de línea. Cero pérdida de fidelidad.

  • Archivo grande sin query: devuelve el mapa estructural (outline con líneas).

  • MEMORIA cross-sesión: si el archivo ya fue leído antes y no cambió, devuelve "unchanged" + outline (~50 tokens). Si cambió, devuelve SOLO el diff unificado. force_full=true para saltear la memoria.

  • HTML: se limpia localmente (scripts/tags fuera) antes de procesar.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "params": "<params>"
    },
    "name": "router_smart_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/idempotent annotations by disclosing the ~6KB threshold, BM25/embedding ranking, line numbers, cross-session memory returning 'unchanged' or a unified diff, and local HTML sanitization. These are exactly the surprising behaviors an agent needs to know before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose followed by tight bullets, one per mode. No filler sentences; every bullet carries an actionable rule.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return shapes need not be explained, and all read modes plus memory behavior are covered. Minor gaps remain: error behavior for missing/unreadable files and any absolute path-size limits are unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is reported as 0%, so the description must compensate; it explains what query does (ranking, and outline fallback when omitted) and force_full (ignore read memory). It does not mention top_k or the top_k default behavior, leaving that parameter documented only by the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Lee un archivo') plus the defining constraint ('protegiendo la ventana de contexto') and the local/deterministic nature. This is clearly distinguishable from the sibling search/status tools, which do not read individual files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit mode-selection rules: small file → full content, large file + query → ranked fragments, large file without query → outline, unchanged file → 'unchanged', force_full to bypass memory. It never explicitly says when to prefer this over router_project_search, so the routing guidance is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.