Skip to main content
Glama

github.search_code

Search code across GitHub for file matches and text fragments, optionally filtered by repository, language, or result limit.

Instructions

Search code across GitHub. Returns file matches with text fragments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoScope to specific repo (owner/name)
limitNo
queryYes
languageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, but it only hints at the return (file matches with fragments). It says nothing about authentication needs, rate limits, pagination, match ordering, or whether the search is exact vs fuzzy — all material for a search tool.

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?

Two short sentences, front-loaded with the core action and immediately followed by the key output detail. No filler or redundancy.

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

Completeness2/5

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

For a four-parameter search tool with no annotations, no output schema, and low schema coverage, the description is too thin. An agent gets the gist but lacks the query/filter semantics and behavioral context needed to invoke it confidently.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 25% (only 'repo' is documented), so the description should compensate. Instead it says nothing about query syntax, the repo filter, language filtering, the limit default/max, or that query is required, leaving three of four parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search code across GitHub') and adds the return shape ('file matches with text fragments'), which lets an agent distinguish it from a repo-level search. It stops short of explicitly contrasting with siblings like github.search_repos or code.symbols, so it is clear but not fully differentiated.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus the many adjacent tools (github.search_repos, code.symbols, code.reach). Usage is only implied by the verb 'Search code', with no context, prerequisites, or exclusions offered.

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