Skip to main content
Glama
Repo Insight MCP

Repo Insight MCP

by viradm

search_code

Search code within a single GitHub repository to locate keywords, functions, or patterns; requires GITHUB_TOKEN for authenticated queries.

Instructions

Search code inside one repository. GitHub's code search requires authentication, so this needs GITHUB_TOKEN set.

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": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesowner/name or a github.com URL
limitNo
queryYestext to search for in the code
extensionNorestrict to one extension

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the behavioral burden, and it does disclose one genuinely useful trait: GitHub code search requires authentication via GITHUB_TOKEN. It says nothing about rate limiting (a well-known constraint on GitHub code search), pagination, or whether results are scoped to the default branch, leaving real gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and scope, followed by the auth constraint. Nothing is padded, though the line-break inside the first sentence makes the formatting slightly awkward.

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?

An output schema exists, so return values need not be described, and the auth prerequisite is covered. For a search tool on a rate-limited external API, however, the absence of any note on throttling, result caps, or search-versus-read guidance leaves it only minimally complete.

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 75%, with repo, query, and extension already documented in the schema; only 'limit' lacks a description there. The description adds no parameter meaning at all, so the schema does essentially all the work — baseline 3 for high coverage is appropriate.

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 and resource ('Search code') with an explicit scope restriction ('inside one repository'), which distinguishes it from sibling tools like read_file or list_tree that address known paths rather than searching. It stops short of naming an alternative, but the action itself is unambiguous.

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

Usage Guidelines2/5

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

The second sentence is a prerequisite (GITHUB_TOKEN must be set), not when-to-use guidance. There is no statement about when to search versus reading a known file, or when a search would be inappropriate.

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