Skip to main content
Glama

github_search_code

Search code across GitHub using qualifiers like repository, path, extension, and language to find specific code snippets and references across public repositories.

Instructions

Search code across GitHub.

Supports qualifiers: repo:owner/repo, path:src/, extension:py, language:python, etc.

Args: query: Code search query (e.g., 'FastMCP language:python') max_results: Maximum results (default: 20) session_name: GitHub session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It does disclose that this is a search operation and that a session_name is required, but it lacks details on authentication requirements, rate limits, pagination, or any side effects. The qualifier examples add some behavioral context, but the transparency is not comprehensive.

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 extremely concise: two sentences plus a short args list. It front-loads the core purpose ('Search code across GitHub.') and then packs additional useful info (qualifiers, defaults) without any wasted words.

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's simplicity and the presence of an output schema (which handles return values), the description covers the essential aspects: query format with qualifiers, max_results, and session_name. It does not mention authentication prerequisites or API-specific limits, but for a search tool with a manageable parameter set, the information is sufficient for an agent to invoke it correctly.

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 description coverage is 0%, so the description must explain the parameters. It does so effectively: 'query' gets an example ('FastMCP language:python'), 'max_results' is given a default (20) and meaning, and 'session_name' is described as the GitHub session to use. This adds meaningful semantics beyond the 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 description clearly states the tool's function: 'Search code across GitHub.' The verb 'search' and resource 'code' are specific, and the qualifier examples (repo:, path:, extension:) help distinguish it from sibling search tools like github_search_repos and github_search_issues.

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 provides clear context for when to use this tool (code search) through the qualifier examples and the 'Search code' statement. It does not explicitly mention alternatives or when not to use it, but the differentiation from search_repos/search_issues/search_users is implicit in the name and description, earning a 4 rather than a 5.

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/Pawangunjkar/github-mcp'

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