Skip to main content
Glama

trawl_search_code

Search source code by query and narrow results with language and symbol-type filters to find functions, classes, or methods in the right files.

Instructions

Search code specifically with language and symbol type filters.

Input Schema

NameRequiredDescriptionDefault
queryYesCode search query
top_kNoNumber of results (default: 40, max: 50)
languagesNoFilter by languages (e.g., python, typescript)
pool_nameNoPool to search
symbol_typesNoFilter by symbol types (function, class, method)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and provides almost none. It does not state that this is a read-only/no-side-effect operation, nor does it describe result format, pagination, or any rate/permission constraints.

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 front-loaded sentence with no wasted words. However, its brevity stems partly from under-specification rather than disciplined conciseness, keeping it from a top score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with five parameters and no annotations or output schema, the description is too thin. It omits the query parameter's role, top_k default/max, pool_name semantics, and return-value expectations, leaving significant gaps for correct invocation.

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 the baseline is 3. The description mentions language and symbol type filters, which maps to two parameters, but adds no syntax, format, or default details beyond what the schema already documents for all five parameters.

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?

The description states a specific verb ('Search') and resource ('code') and highlights two distinguishing capabilities (language and symbol type filters). It is clear what the tool does, but it never names or contrasts with sibling search tools like trawl_search, trawl_search_pool, or trawl_find_symbol, so an agent must infer differentiation.

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 is given on when to choose this tool over the many sibling search tools (trawl_search, trawl_search_pool, trawl_find_symbol, trawl_search_entities, etc.). The description implies usage only through the mention of filters, leaving the agent to guess selection criteria.

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