Skip to main content
Glama

search_public_code

Read-only

Search public repositories for an exact code string; return WHERE it appears.

Use it to hunt vendored / copy-pasted copies of known-vulnerable code: search a
distinctive line or symbol from the vulnerable function, then FETCH AND READ the hits
to judge which copies are still unpatched, reachable, or just fossils/forks. Returns
RAW search results only -- it makes no vulnerability judgment; that reasoning is yours.

Args:
    code:  an exact code string, e.g. "VP8LBuildHuffmanTable" or a distinctive line.
    lang:  language filter for the code search (default "c").
    limit: max hits to return.

Input Schema

NameRequiredDescriptionDefault
codeYes
langNoc
limitNo

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?

Annotations already cover the safety profile (readOnlyHint, openWorldHint), and the description adds real value on top: results are RAW and carry no vulnerability judgment, and the agent is expected to fetch and read hits rather than treat them as conclusions. It stops short of describing result shape, ranking, or rate-limit behavior, which matters for an open-web search.

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?

Front-loads purpose, then use-case, then a caveat about raw results, then args — a sensible order. The capitalized emphasis ("WHERE", "FETCH AND READ") and the args block are slightly heavier than needed given the schema already lists the properties, but nothing is wasted.

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 tells the agent what comes back (raw locations, not judgments) and what to do next (fetch and read). For a read-only, open-world search tool that is close to sufficient; return format and pagination beyond `limit` remain unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the parameters — and it does. It defines `code` (an exact code string, with a concrete example), `lang` (language filter, default "c"), and `limit` (max hits), each adding meaning beyond the bare schema titles.

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 public repositories for an exact code string' — and clarifies the output shape ('return WHERE it appears'), which is more than a restatement of the name. It does not name or contrast any sibling (e.g. search_vulns, which searches vulnerability records rather than code), so the differentiation is inferred rather than explicit.

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 concrete when-to-use guidance: hunt vendored/copy-pasted copies of known-vulnerable code, start from a distinctive line or symbol, then fetch and read the hits to judge patch/reachability status. This is a clear operational workflow, but it offers no exclusions or contrast against the other search-flavored siblings.

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.