Skip to main content
Glama

enrich_feature

Collects relevant documentation and code context for a feature, detects related files and architectural patterns, and prepares worker-ready context.

Instructions

Auto-enrich a feature with relevant documentation and code context. Uses intelligent analysis to find related files, detect patterns, and prepare context for workers.

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": {
      "projectDir": "<projectDir>",
      "featureId": "<featureId>"
    },
    "name": "enrich_feature"
  }
}

Input Schema

NameRequiredDescriptionDefault
featureIdYesID of the feature to enrich
projectDirYesAbsolute path to the project directory
maxDocLengthNoMaximum characters per documentation file (default: 4000)
maxCodeLengthNoMaximum characters per code file (default: 2000)
detectPatternsNoEnable architectural pattern detection (default: true)
maxRelatedFilesNoMaximum number of related files to include (default: 10)
maxTotalContextNoMaximum total context size (default: 16000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden and falls short: "enrich" could mean persisting context onto the feature or merely returning a computed blob, and the description never resolves which. It also omits the cost/latency implications of a scanning operation, whether existing context is overwritten, and whether deeper analysis toggles behave differently. "Uses intelligent analysis" is marketing framing rather than a behavioral disclosure.

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?

Two sentences, front-loaded with the core action, with no filler or redundancy. The second sentence is somewhat vague ("intelligent analysis") but occupies little space, so nothing needs trimming.

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

Completeness2/5

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

A 7-parameter analysis tool with no annotations and no output schema leaves the return value entirely undocumented, yet the description does not explain what comes back, whether it is written to the feature record, or how the enrichment interacts with downstream worker tools. For a tool of this complexity the description is materially incomplete.

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 100%, so all seven parameters, including defaults for maxDocLength, maxCodeLength, maxRelatedFiles, maxTotalContext, and detectPatterns, are already documented in the schema. The description adds no further meaning such as how the budget parameters interact or what tradeoffs changing them creates, so the baseline 3 applies.

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 specific verb and resource: "Auto-enrich a feature with relevant documentation and code context," then adds what the enrichment does (find related files, detect patterns, prepare context for workers). It is clear what the tool produces conceptually, though it never distinguishes itself from context-setting siblings such as set_feature_context.

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

Usage Guidelines2/5

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

No statement of when to call this versus alternatives, no prerequisites (does the feature need to exist? must projectDir be pre-indexed?), and no indication of whether it is safe to re-run. The phrase "prepare context for workers" hints at a workflow position but leaves the agent to infer it.

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