Skip to main content
Glama

search_with_dependencies

Search code semantically and include dependency context for matching files, combining semantic results with structural dependency analysis to give AI coding assistants relevant project context.

Instructions

Searches codebase and optionally includes dependencies of matching files.
Combines semantic search with structural dependency analysis.

Args:
    query: Search query
    n_results: Number of semantic search results (default 5)
    include_deps: Whether to include dependencies (default True)
    depth: Dependency depth to include if include_deps=True (default 1)

Returns:
    Search results with optional dependency context

Input Schema

NameRequiredDescriptionDefault
depthNo
queryYes
n_resultsNo
include_depsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full load. It does disclose defaults for all optional params and promises 'Search results with optional dependency context,' which is useful, but it says nothing about cost/performance of large depth, result limits, or whether the read is purely side-effect free — traits an agent would want before requesting deep dependency expansion.

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?

The capability statement is front-loaded in two sentences, followed by a compact Args/Returns block with zero filler. The Returns section is slightly redundant given an output schema exists, but the overall structure is tight.

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 four-param search tool with an output schema, the essentials are covered (what it does, param defaults, rough return shape). The gap is contextual: no guidance on when this beats search_codebase_advanced or get_dependencies_with_depth, and no note on the cost of deep traversal in a 50+ tool server.

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

Parameters4/5

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

Schema description coverage is 0% (only titles and defaults), so the description must compensate and largely does: all four parameters are named with their meanings and default values. What remains thin is the semantics of 'depth' (depth of what relation, and its cost) and whether n_results bounds only the semantic stage or the final expanded set.

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 and resource ('Searches codebase') and adds a distinctive angle: it merges semantic search with structural dependency expansion. That is clearer than a bare restatement, but it never names the siblings it overlaps with (search_codebase, search_codebase_advanced, get_dependencies_with_depth), so the agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'optionally includes dependencies' hints that include_deps should be toggled when dependency context matters, but there is no explicit when-to-use, when-not-to-use, or comparison against the many sibling search/dependency tools. An agent can guess, but nothing routes it deliberately.

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