Skip to main content
Glama

get_context

Fetches structured triage context for files, modules, or symbols—relationships, signatures, hotspots, and risk signals—without source bytes, helping agents assess code impact before reading files.

Instructions

Triage card for files / modules / symbols — relationships, not source bytes.

Returns title, summary, signatures with line numbers, hotspot bit, and
decision_record titles. A symbol row without symbol_id is path::name.
fix_history appears only on files with counted bug fixes (count, age,
bug_magnet); hotspot is churn. Either one is a cue to
call get_risk. episodes counts the dated records bound to a target — what
happened here and why — and appears only when there is at least one;
get_why serves the bodies. A symbol target is counted as its file, and a
module aggregates everything beneath it.
Batch targets in one call. No source bytes by default: pass
include=["skeleton"] for the whole file body-elided and line-verified in
ONE call, or Read it. Do not call get_symbol per signature.

Default responses fit 24,000 serialized chars; nonempty ``include`` uses
32,000. Reductions carry counts and ``_meta.omitted`` recovery refs;
``_meta.recovery_unavailable`` names a storage failure.
Include-gated blocks are projections, not omissions.

Args:
    targets: file paths, module paths, or "path::Symbol" ids.
    include: opt-in blocks: full_doc | ownership | last_change | callers
        | callees | metrics | community | decisions | skeleton | health
        | doc_drift (documents naming this file) | symbols (all of a
        file's symbols; the default lists the top 15, classes and
        functions first).
        An unrecognised key is named in ignored_arguments.
    compact: default True; False adds structure+imports+docstrings.
    repo: usually omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
compactNo
includeNo
targetsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/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 so richly: response-size ceilings (24,000 vs 32,000 chars), reduction counts, `_meta.omitted` recovery refs, `_meta.recovery_unavailable` storage-failure naming, and the note that include-gated blocks are projections rather than omissions. These are behavioral traits not derivable from the schema.

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 first line is a strong front-loaded thesis, and most sentences earn their place given the tool's complexity. However, some fragments are terse to the point of ambiguity ('A symbol row without symbol_id is path::name'), slightly taxing readability.

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

Completeness5/5

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

An output schema exists, yet the description still conveys enough about return contents (signatures with line numbers, hotspot bit, fix_history fields, episodes) and behavioral limits for an agent to invoke the tool confidently. Nothing essential is missing for a tool of this complexity.

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

Parameters5/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 does: it enumerates all twelve `include` options with per-option meaning (e.g. doc_drift, symbols with default top-15 listing), explains `compact`'s effect, and clarifies `targets` formats including the 'path::Symbol' id and module aggregation. This far exceeds the bare 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 opening line gives a specific verb (triage) plus resource (files/modules/symbols) and an explicit scope boundary: 'relationships, not source bytes.' It distinguishes itself from siblings by naming get_risk, get_why, get_symbol, and Read as separate concerns. An agent can tell what this returns without opening the schema.

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?

Explicit routing guidance throughout: 'Either one is a cue to call get_risk', 'get_why serves the bodies', 'Do not call get_symbol per signature', 'or Read it', and 'Batch targets in one call.' It states when to use it and which alternatives to prefer for other data shapes.

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