Skip to main content
Glama
google-seo-mcp
by Akxan

Search code in a repository

github_search_code
Read-onlyIdempotent

Search file contents in one GitHub repository using code-search syntax to find matching files and code fragments. Locate files, then open known files when private-repo indexing returns no results.

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, and often empty for private repos: then search a known file with github_get_file find.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>",
      "query": "<query>"
    },
    "name": "github_search_code"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this is a read-only, idempotent, non-destructive, open-world operation, so the description doesn't need to restate safety. Instead it adds real behavioral detail the annotations lack: the index covers the default branch only, coverage is often empty for private repos, and the return is matching files with fragments. Missing only rate/quota behavior and pagination.

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 tight sentences, front-loaded with the core action and scope, then syntax examples, then the operational caveat with its remedy. Every clause carries information an agent needs; nothing is redundant with the annotations or schema.

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?

With no output schema, the description correctly states the return shape ('matching files with fragments') and discloses the indexing limitation that most often causes empty results. Only the undocumented limit parameter and pagination/result-window behavior are left unaddressed, which is a minor gap for a 3-parameter read 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?

Schema coverage is 33%: repo is documented inline, but query and limit are not. The description compensates well for query by demonstrating GitHub code-search syntax ('og:image path:src', 'canonical extension:astro'), but says nothing about limit (1-50, default 20) or that query is the free-text expression. Partial compensation for a low-coverage schema lands at 3.

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?

States a specific verb+resource ('Search file contents') and immediately bounds the scope to 'one repository', then illustrates with two concrete query examples. It also names github_get_file as the fallback for a known file, so an agent can distinguish this tool from the file-fetch sibling without opening either schema.

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?

Gives an explicit when-to-switch rule: if results are 'often empty for private repos', search a known file with github_get_file find. That is a genuine routing condition rather than a vague hint. It stops short of a full when/when-not matrix (e.g. no guidance on choosing this over broader search tools), which keeps it at 4.

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