Skip to main content
Glama

GitPicker

search_code

在 GitHub 全站代码中搜索(默认分支已索引代码)。当用户想定位某个函数/配置/API 的实现位置、查找用法示例时使用,比仓库搜索更精确。支持限定符:repo:owner/name、language:、path:、filename:。注意必须至少包含一个关键词,仅限定符会被拒绝。

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": {
      "query": "<query>"
    },
    "name": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo页码,从 1 开始,默认 1(每页 15 条)
queryYes代码搜索串,如 'useRouter repo:vercel/next.js' 或 'cache_components language:typescript'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose non-obvious traits: only default-branch indexed code is searched, qualifier syntax is accepted, and a query consisting solely of qualifiers is rejected. It omits operational traits such as GitHub code-search rate limits or result-count caps, which would matter for an agent planning repeated calls.

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?

Front-loaded with what the tool does, then use cases, then the sibling comparison, then qualifier syntax and the hard validation rule. No redundant sentences; the trailing constraint warning is short and earns its place by preventing a class of failed calls.

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?

There is no output schema, but the description plus the schema's page parameter (15 per page) give enough to call it correctly: scope, qualifiers, and the minimum-keyword rule are all covered. A brief note on result volume or ordering would have closed the remaining gap.

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 100%, so both parameters are already documented in the schema, making 3 the baseline. The description does add real meaning beyond the schema by enumerating the supported qualifiers (repo:, language:, path:, filename:) and the requirement that at least one free-text keyword be present, which the schema examples only hint at.

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 concrete verb and resource (site-wide GitHub code search) plus the scope constraint that only default-branch indexed code is covered. It also distinguishes itself from the sibling repo search by claiming greater precision, so an agent can tell search_code apart from search_repos 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 clear when-to-use cues: locating where a function/config/API is implemented, and finding usage examples. It also positions itself relative to repo search. It stops short of explicit 'do not use this when…' exclusions (e.g., for whole-repo or file-content browsing via read_file/list_files), so it is not a full 5.

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