Skip to main content
Glama

phabricator_repository_code_search

Read-only

Search Phabricator Diffusion repository file contents by pattern to locate code or text, with optional path, branch, and commit filters.

Instructions

Search (grep) file contents within a Diffusion repository

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

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory path to search within (default: root)
limitNoMaximum results (max 100)
queryYesSearch query / pattern
branchNoBranch name
commitNoCommit hash or branch (default: HEAD)
offsetNoResult offset for pagination
repositoryYesRepository callsign, short name, or PHID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.19

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, so the safety profile is covered. The description adds only the 'grep' characterization of matching; it says nothing about regex vs literal matching, case sensitivity, default branch/commit scope, or pagination semantics beyond what the schema shows.

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?

A single short sentence, front-loaded with the verb and result type, with zero filler. It is efficient, though its brevity is achieved partly by omitting useful detail.

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?

For a 7-parameter search tool with no output schema, the description leaves the agent guessing about result shape (file paths + line matches?), matching mode, and how branch/commit/path interact. It is minimally viable but not 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 description coverage is 100%, so all 7 parameters (path, limit, query, branch, commit, offset, repository) are already documented in the schema. The description adds no additional parameter meaning, so the baseline 3 applies.

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 (search/grep) and resource (file contents within a Diffusion repository), which distinguishes it from sibling content tools like repository_file_content or repository_browse. It stops short of explicitly contrasting with those siblings, but the verb+scope 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?

No guidance on when to use this versus phabricator_repository_file_content, phabricator_repository_browse, or phabricator_commit_search. The 'grep' parenthetical implies pattern-based lookup, but no conditions or exclusions are stated.

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

Deploy Server

Other Tools