Skip to main content
Glama

engineering_context_tool

Assembles engineering context from tagged memories and current-task relevance, then scores, orders, and truncates results to a token budget while preserving conflicts and warnings.

Instructions

Assemble engineering context with output ordering.

Pipeline: tag match -> score -> sort -> truncate -> serialize. Conflicts and warnings are NEVER dropped for budget.

Args: tags: Tags to match against task: Optional task description (shown in output header) token_budget: Optional token budget for truncation types: Filter by memory types include_stale: Whether to include potentially stale items current_task: Description of what you're working on right now. Boosts scoring for memories relevant to this task. max_item_chars: Cap a single item so it cannot dominate the budget as_of: Evaluate temporal validity at this ISO timestamp include_expired: Include memories outside their validity window include_file_state: Include operational file-state TLDRs (default false) paths: Filter items whose evidence matches these file paths project: Optional project root path. Auto-detected from git root if omitted.

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": {
      "tags": "<tags>"
    },
    "name": "engineering_context_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsYes
taskNo
as_ofNo
pathsNo
typesNo
projectNo
current_taskNo
token_budgetNo
include_staleNo
max_item_charsNo
include_expiredNo
include_file_stateNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.11.0
    • addedInput schema / properties / as_of
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "As Of"
      +}
    • addedInput schema / properties / include_expired
      Added value: +{
      +  "default": false,
      +  "title": "Include Expired",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_file_state
      Added value: +{
      +  "default": false,
      +  "title": "Include File State",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / max_item_chars
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Item Chars"
      +}
  2. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / paths
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Paths"
      +}
  3. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose two valuable non-obvious traits: the ordering pipeline and the guarantee that 'Conflicts and warnings are NEVER dropped for budget', which defines truncation policy. It still leaves out whether the call is read-only, permission requirements, and how project auto-detection fails, so a mutation-safety or failure-mode reader is left guessing.

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?

The pipeline and the budget guarantee are front-loaded, and the Args list, though long, is justified by the 0% schema coverage. A couple of lines restate parameter names with little added value, but overall there is little waste.

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?

For a 12-parameter tool with no annotations, the definition covers the assembly order, the truncation carve-out, and every argument's intent; the presence of an output schema means return shape need not be described. The only real gap is that safety/read-only characteristics and default project-resolution failure behavior are unaddressed.

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 description coverage is 0%, so the description must compensate, and the Args block does so for all 12 parameters, adding real meaning beyond bare titles: task is 'shown in output header', current_task affects scoring, max_item_chars exists so one item 'cannot dominate the budget', as_of is an ISO timestamp for temporal validity, and include_file_state defaults to false. A few entries are near-tautological (tags: 'Tags to match against', types: 'Filter by memory types'), which keeps it short of a 5.

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 verb and resource ('Assemble engineering context') and adds a pipeline breakdown (tag match -> score -> sort -> truncate -> serialize) that tells the agent how the result is produced. It does not distinguish itself from any sibling memory_* tool, so an agent must infer that this is the assembled/ranked context builder rather than a plain search.

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?

There is no explicit when-to-use or when-not-to-use guidance and no named alternative such as memory_search_tool. The only hints are buried in argument notes (current_task 'boosts scoring', project 'auto-detected from git root'), which imply behavior but never state which tool to pick for a given situation.

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