Skip to main content
Glama

Codebase Search

codebase_search

Search a local Drupal codebase to find modules that provide a capability, ranked by exact name, description, then code matches; filter by custom, contrib, or all.

Instructions

Search the local codebase for modules providing a capability.

Ranks exact machine-name/name matches above description matches, which rank above code-body matches (hooks, services, routes, classes). Use scope 'custom' or 'contrib' to filter by module origin; 'all' includes core.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
scopeNoall

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a genuinely useful behavioral trait: the ranking order (machine-name/name > description > code-body). It does not state read-only nature explicitly, though the output schema relieves it of explaining return values.

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?

Purpose is front-loaded in the first sentence and the ranking rule and scope note follow compactly with no filler. Well sized for the amount of information conveyed.

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?

The presence of an output schema means return values need not be described, and the ranking plus scope notes cover the core behavior. Still missing is any routing guidance against the many overlapping search/list siblings, leaving an agent to guess between this and module_search.

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 0%, so the description must compensate. It explains the meaning of scope values ('custom'/'contrib' filter by origin, 'all' includes core), which the schema does not since there is no enum. Query and limit remain undocumented, so compensation is only partial.

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) and resource (local codebase) and narrows the target to 'modules providing a capability,' which separates it from list-style siblings like codebase_module_list. However, it never explicitly contrasts itself with module_search or search_entities, so the agent must infer the distinction.

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 only guidance is about the scope parameter values ('custom'/'contrib'/'all'), which is parameter semantics rather than when-to-use. There is no statement of when to prefer this over module_search, codebase_module_list, or codebase_hooks_find despite many plausible alternatives in the sibling set.

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