Skip to main content
Glama

tier_context

Answers codebase or document questions in one call by resolving the index, running hybrid search, and packing relevant sections and dependencies within a token budget.

Instructions

PRIMARY ENTRY POINT: answer a question about a codebase or document in ONE call. Resolves (and auto-builds/syncs) the repository index, routes with hybrid search, matches symbol names, then packs L2 section bodies, L3 source slices, and a dependency summary until budget_tokens is reached. Use this first; fall back to the granular tier_* tools only when you need a specific section id, symbol, or lint check.

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": {
      "query": "<query>"
    },
    "name": "tier_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOptional .tier file or directory; defaults to the server root's index
queryYesNatural-language question or symbol names
budget_tokensNoMaximum tokens of context to return
include_callsNoCall-table detail: auto keeps only edges leaving the matched symbols, all keeps every stored edge, none omits the tableauto
include_impactNoInclude a compact dependency/impact summary for repo maps

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses important behavior: it may auto-build or sync the repository index, performs hybrid search and symbol matching, packs section bodies and source slices, and respects budget_tokens. It does not fully clarify index mutation side effects, permissions, error behavior, or whether the sync writes to the repository, which keeps 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.

Conciseness5/5

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

The description is front-loaded and efficient: it identifies the tool as the primary entry point, summarizes the execution pipeline, and states the fallback condition without unnecessary wording.

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 complex, multi-stage retrieval tool with no output schema, the description is substantially complete: it explains the overall process, token budgeting, index auto-building, and when to use alternatives. It could say more about the returned context format or failure behavior, but it gives an agent enough to invoke the tool 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 100%, so all five parameters are already documented. The description adds useful meaning for budget_tokens by explaining that context packing continues until the budget is reached, and it mentions dependency summaries, but most parameter semantics still come from the schema.

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?

The description provides a specific verb and resource: answer a question about a codebase or document in one call. It explains the full pipeline (index resolution, hybrid search, symbol matching, context packing) and clearly distinguishes this as the primary entry point versus granular tier_* tools.

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

Usage Guidelines5/5

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

It explicitly says to use this first and only fall back to granular tier_* tools when a specific section id, symbol, or lint check is needed. That gives clear when-to-use and when-not-to-use guidance with named alternatives.

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