Skip to main content
Glama

search_context

Search a GitHub repository and return only the passages that match a query — each with its file path, line number and a relevance score. Far more token-efficient than pack_repo when you need a specific detail (e.g. "where is auth handled?").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoOptional branch, tag or commit SHA (defaults to the default branch).
repoYesA GitHub repo as "owner/repo" or a github.com URL.
queryYesSpace-separated search terms; matching is case-insensitive.
excludeNoOptional glob patterns (support **, *, ?).
includeNoOptional glob patterns (support **, *, ?).
max_matchesNoMax passages to return (1–50, default 5).
context_charsNoPer-passage character budget (80–4000, default 500).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosing behavior. It does so by explaining that only matching passages are returned, with specific metadata (file path, line number, relevance score), and that it is token-efficient. This goes beyond a bare name and offers useful behavioral context, though it doesn't mention permissions or potential side effects (which are likely nonexistent).

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 two sentences, front-loaded with the core action and output, and includes a practical usage tip. Every sentence earns its place without fluff.

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?

Given the tool has 7 parameters and no output schema, the description does a good job of explaining the overall purpose and return shape. It doesn't explain all parameter interactions, but the schema descriptions handle those. It lacks details on error conditions or edge cases, but for typical use it is sufficient.

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 the baseline is 3. The description does not add any extra meaning about parameters beyond what the schema already provides. The term 'query' is referenced, but not elaborated beyond the schema's own description.

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 clearly states the tool's verb plus resource: 'Search a GitHub repository and return only the passages that match a query.' It specifies the output format (file path, line number, relevance score), and differentiates itself from the sibling tool pack_repo by highlighting token efficiency for targeted searches.

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?

The description gives explicit guidance on when to use this tool over pack_repo ('when you need a specific detail'), and contrasts it with the more heavy-weight pack_repo. It doesn't explicitly mention other siblings like search_docs, but the stated use case is clear enough to guide selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a distinct purpose: get_file for a single file, list_files for repo layout, pack_repo for full repo context, search_context for targeted repo queries, and similarly pack_docs/search_docs for documentation. There is no overlap or ambiguity between tools.

Naming Consistency4/5

All tool names follow a verb_noun pattern (get_file, list_files, pack_docs, pack_repo, search_context, search_docs). The only minor inconsistency is 'search_context' versus 'search_docs'; 'context' is slightly less clear than would be 'search_repo', but the pattern is otherwise consistent.

Tool Count5/5

With 6 tools, the server is well-scoped. Each tool covers a core operation (file access, listing, packing, searching) for two domains (repo and docs). The count feels right for the server's purpose.

Completeness5/5

The tool surface fully covers the domain of context retrieval: you can list files, get a file, pack a repo or docs site, and search for specific passages. There are no obvious missing operations for the stated purpose of packing and searching code and documentation.