Skip to main content
Glama

Search code across public GitHub repositories

github_search_code
Read-onlyIdempotent

Search code across public GitHub repositories. Read-only: returns public data and changes nothing. Costs 1 credit per request.

Input Schema

NameRequiredDescriptionDefault
forkYesWhether to include forks. Defaults to excluding them.exclude
pathNoPath prefix within the repo, e.g. "src/app". Maps to `path:`.
sortYesSort field. Defaults to relevance ("best-match").best-match
countYesNumber of results to return (1–10). Defaults to 10.
orderYesSort direction. Defaults to "desc".desc
queryNoFree-text search terms, matched against the default fields for this search type, e.g. "web framework".
reposNoLimit to these "owner/name" repositories. Maps to `repo:`.
startNoNumber of results to skip (0–999). Defaults to 0. Only the first 1,000 results of a search can be paged through.
ownersNoLimit to these owners (users or orgs). Maps to `user:`.
filenameNoExact file name, e.g. "package.json". Maps to `filename:`.
languageNoProgramming language, e.g. "Go". Maps to `language:`.
extensionNoFile extension without the dot, e.g. "ts". Maps to `extension:`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint, so the safety profile is covered and "returns public data and changes nothing" largely restates it. The genuinely additive disclosure is "Costs 1 credit per request", a budgeting constraint not present in any structured field, plus the implicit guarantee that only public (non-private) repositories are reachable.

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?

Three short sentences, zero filler, with the purpose front-loaded and the safety/cost facts trailing. Nothing is repeated or wasted.

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?

For a 12-parameter search tool with no output schema, the description says nothing about result shape, paging behavior, or the 1,000-result ceiling that matters when chaining calls (the schema only hints at it via start's max). Annotations plus a fully documented schema keep it adequate, but the routing gap versus sibling search tools leaves it incomplete.

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% and every one of the 12 parameters carries its own description, including GitHub query-syntax mappings (path:, repo:, user:, filename:). The description adds no parameter meaning of its own, so the baseline 3 applies.

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+resource ("Search code across public GitHub repositories") and pins the scope to public repos, which separates it from write-oriented GitHub tools. It does not explicitly distinguish itself from the nearest sibling, github_search_repositories, so an agent must infer that this one matches file contents rather than repository metadata.

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?

Usage is only implied by the phrase "search code"; there is no explicit when-to-use or when-not-to-use guidance and no named alternative such as github_search_repositories or github_search_commits. The scope word "code" is the only routing signal the agent gets.

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.

Resources