Skip to main content
Glama
Akxan
by Akxan

Search code in a repository

github_search_code
Read-onlyIdempotent

Search file contents in a GitHub repository using code search syntax to locate matching files and fragments.

Instructions

Search file contents in one repository (GitHub code search syntax, e.g. 'og:image path:src', 'canonical extension:astro'). Returns matching files with fragments. Indexed for the default branch only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository as 'owner/name', e.g. 'octocat/my-site'.
limitNo
queryYes

Schema Changelog

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

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate read-only and idempotent behavior. The description adds useful details about the return value ('matching files with fragments') and an important limitation (indexed for default branch only), going beyond the 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?

The description is two sentences, direct, and includes examples and a key limitation without unnecessary detail.

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?

The description explains the primary return value and the default branch limitation. Since there is no output schema, the return description is adequate; further detail about ordering or pagination would be helpful but is not essential for this simple tool.

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?

Only 'repo' is described in the schema, and 'query' lacks a schema description. The description does provide query examples using GitHub code search syntax, which partially compensates, but 'limit' is left entirely to schema constraints and default values.

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 searches file contents in one repository and returns matching files with fragments, which distinguishes it from sibling tools like github_get_file or github_list_dir.

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 implies usage for code search within a single repository and notes the default-branch-only limitation, but it does not explicitly contrast with alternatives such as github_get_file or github_list_dir.

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

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/Akxan/google-seo-mcp'

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