Skip to main content
Glama

ecg_search_context

Return the smallest connected fact neighborhood for a query, letting AI coding sessions recall relevant decisions and constraints without replaying full transcripts.

Instructions

Return the smallest fact neighborhood for query. This is the only body export.

The server ranks facts itself from query and entity_names. It does not accept a fact-id list, so a caller cannot widen an approval by naming extra facts. Results are connected clusters labeled by their shared entity (or the top fact title). When the rendered block would exceed ECG_AUTO_INJECT_MAX_TOKENS, or ECG_AUTO_INJECT=preview, the block contains titles only and says why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
session_idYes
entity_namesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses server-side ranking, that no fact-id list is accepted (and why a caller cannot widen an approval), cluster labeling, and the token/preview fallback to titles-only. It omits permission/auth requirements and error behavior, keeping it short of a 5.

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

Conciseness4/5

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

Four tight sentences with the purpose front-loaded and each sentence adding new information (ranking, constraint, output shape, fallback). Some information is dense jargon, but there is little waste.

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

Completeness3/5

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

The output schema covers return values and the description usefully explains cluster labeling and the preview fallback. However, with 0% parameter coverage, the unexplained session_id and limit leave genuine gaps for an agent trying to invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it only partially does: it explains how query and entity_names drive server-side ranking but says nothing about session_id's role or the meaning/effect of limit (default 8). Half the parameters remain undocumented.

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

Purpose4/5

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

States a concrete action and resource ('Return the smallest fact neighborhood for query') and adds a distinguishing claim, 'This is the only body export,' which separates it from the session/placement siblings. The scope is clear, though the domain jargon ('fact neighborhood', 'body export') requires some inference and no sibling is named directly.

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

Usage Guidelines3/5

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

The description implies usage through 'This is the only body export' and the ranking/preview behavior, but it never states when to prefer this over ecg_get_session or the placement tools, nor any prerequisites. Usage must be inferred rather than read.

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