Skip to main content
Glama

Get Context

get_context

Fetches, ranks, and returns relevant checks, specs, docs, and tech stack for your current task within a token budget, with IDs to fetch remaining items.

Instructions

Intelligent context aggregator: fetches checks, specs, docs, and tech stack, ranks them by relevance to your current task, and returns the full text of the highest-ranked items within a token budget — each with the ID needed to fetch the rest. Use this instead of calling individual tools when you want curated, relevant context.

Input Schema

NameRequiredDescriptionDefault
file_pathsNoFile paths being edited — used for language/category detection
max_tokensNoMaximum token budget for the response (default: 4000)
task_descriptionYesWhat you're working on (e.g., 'add a new REST endpoint for user preferences')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 load and does well: it discloses relevance ranking against the task, a token-budget truncation behavior, that only top-ranked items come back in full text, and that IDs are returned so the remainder can be fetched. It does not say what happens when a single item exceeds the budget or how ties/ordering are resolved, so it stops short of fully predictable behavior.

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 core capability and the token-budget/ID follow-up mechanic are front-loaded in one dense sentence, with the routing rule second. The em-dash aside is efficient, though the opening sentence is long enough that an agent must parse a lot before reaching the 'use instead of' directive.

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 three-parameter aggregator with no output schema, the description explains the return shape (ranked full text, partial coverage, IDs for the rest) and the budget constraint well enough to call it correctly. What is missing is edge-case behavior around budget exhaustion and whether empty results are possible, which is a modest gap rather than a blocking one.

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 coverage is 100%, so baseline is 3, but the description adds genuine semantics: task_description drives the relevance ranking (not just a label), and max_tokens is a hard truncation boundary on the response rather than a soft hint. That meaning is absent from the schema's own phrasing.

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 names a concrete verb (fetches/ranks/returns) and enumerates the resources aggregated: checks, specs, docs, tech stack. It also states the output shape (ranked full text plus IDs) and contrasts itself with the individual sibling tools, so an agent can distinguish it from get_checks, get_specs, get_docs, and get_tech_stack without opening any schema.

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

Usage Guidelines4/5

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

"Use this instead of calling individual tools when you want curated, relevant context" gives an explicit selection rule against the most likely alternatives. The gap is the inverse case: it never says when to prefer a targeted sibling (e.g., you already know the doc or check ID you need), which matters given eleven sibling get_* tools.

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