Skip to main content
Glama

gh_search_code

Read-onlyIdempotent

Search GitHub source code using all supported qualifiers, such as language or function name, to find precise matches.

Instructions

Search GitHub source code.

Supports all GitHub code search qualifiers (e.g. 'func name:main language:python').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
per_pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
queryYes
truncatedYes
total_countNo
Behavior3/5

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

Annotations already convey read-only and idempotent behavior. The description adds nothing about expected behavior, errors, or side effects. It is not contradictory, but it does not enhance beyond annotations.

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 sentences with no redundant phrasing. The example is useful without being verbose, and the structure is clear.

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

Completeness3/5

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

The description covers the main purpose but lacks details on 'per_page' and does not mention authentication or rate limits. Given the schema richness (only two params), it is incomplete but not severely lacking.

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?

The schema has two parameters (query and per_page) with no descriptions. The description explains 'query' via example but omits any explanation for 'per_page', including its purpose or default value. Thus it only partially covers parameter semantics.

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 'Search GitHub source code' and provides an example with qualifiers, which specifies the resource (code) and action (search). It distinguishes from sibling tools like gh_search_repos and gh_search_issues by explicit reference to 'source code'.

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

Usage Guidelines3/5

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

The description indicates the tool is for code search and mentions qualifiers, but it does not explicitly contrast with other search tools (e.g., repo or issue search). It lacks guidance on when to prefer this tool over alternatives.

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/fvanevski/gh_mcp'

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