Skip to main content
Glama

Upstream.codes

Search code

search_code
Read-only

Search code in one repository. Optional path and language narrow the search. Returns matching files with line fragments.

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

Input Schema

NameRequiredDescriptionDefault
pathNoOnly files under this path.
repoYesRepository slug.
ownerYesNamespace that owns the repository (user or organization handle).
queryYesText to find.
cursorNonextCursor from a previous page.
perPageNoResults per page (default 30).
languageNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds value by disclosing the return shape ('matching files with line fragments'), which matters since there is no output schema, but it says nothing about result caps, ranking, or pagination behavior despite a cursor parameter existing.

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?

Three short sentences with the core action front-loaded and no filler. It is efficient, though the middle sentence on narrowing is the least load-bearing of the three.

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?

Reasonable for a 7-parameter search tool with rich schema coverage: scope, filters, and return shape are all present. However, pagination via cursor and per-page limits — behaviors an agent needs for multi-page retrieval — are left entirely to the schema.

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 description coverage is 86%, so the schema already explains owner, repo, query, path, cursor, and perPage. The description only echoes that path and language act as narrowing filters and adds no syntax, matching, or format detail beyond the schema.

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 in one repository' — and scopes it to a single repository, which separates it from repository-wide listing tools. It does not name a sibling such as get_file_contents or call_api to sharpen the boundary, so it stops short of a 5.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no alternative is mentioned. The only usage-like statement, 'Optional path and language narrow the search,' describes parameter effects rather than tool selection, leaving the agent to infer that this is the find-text-in-files tool.

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