Skip to main content
Glama

get_context

Retrieve a ready-to-cite context bundle with file:line citations to answer coding questions, using reranking and call-graph expansion for grounded answers.

Instructions

Retrieve a ready-to-cite context bundle for answering a question.

Returns the source of the top matches (reranked by a cross-encoder when rerank=True, plus one-hop call-graph neighbors when expand_graph=True) with file:line citations, so the client model can answer grounded and cite spans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
rerankNo
expand_graphNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full burden and does an excellent job. It discloses the return format (source of top matches, file:line citations), and explains the effects of rerank=True and expand_graph=True, offering rich behavioral insight beyond 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.

Conciseness5/5

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

The description is concise at two sentences, front-loads the purpose, and then efficiently explains return behavior and flag effects. No filler or redundant information is present.

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?

An output schema exists, so return-value details need not be over-explained. The description covers purpose, key flags, and citation output, but omits k semantics and any usage prerequisites, leaving minor gaps for a no-annotation tool.

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?

The schema description coverage is 0%, so the description must compensate. It explains the semantics of rerank and expand_graph, but leaves k and query largely implicit. With four parameters, the coverage is partial, not complete.

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 uses a specific verb 'Retrieve' and identifies a distinct resource: a 'ready-to-cite context bundle' for answering a question. It mentions file:line citations and reranking, which clearly differentiates it from siblings like search_code or status.

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?

It explicitly states the tool is for answering a question and producing grounded, citable spans, which gives clear context for when to use it. However, it does not explicitly name alternative tools or state when not to use it, so no exclusions are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/azraf122312/RepoSage'

If you have feedback or need assistance with the MCP directory API, please join our Discord server