Skip to main content
Glama
pleibers
by pleibers

search_focused_context

Get full function and class definitions across multiple files by reusing a prior search query, narrowing to relevant source files and returning complete blocks instead of truncated snippets.

Instructions

Use this only after search_repo_context when the relevant code is spread across multiple files and you need full enclosing functions, classes, or similar definitions instead of truncated snippets. It reuses a prior query_id, narrows to a few files, prefers source files, and returns complete matching blocks without dumping whole files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subpathNo
keywordsNo
query_idNo
directoryNo
max_filesNo
file_pathsNo
match_modeNosubstring
max_blocksNo
max_total_linesNo
paths_exclude_globNo
paths_include_globNo
max_blocks_per_fileNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: it reuses a prior query_id, narrows to a few files, prefers source files, and returns complete matching blocks without dumping whole files. It does not mention rate limits, auth, or error cases, but for a search tool the core behavioral traits are well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that front-loads the usage condition and the key differentiator. Every clause earns its place: when to use, what it returns, and what it avoids. No filler or repetition.

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

Completeness4/5

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

Given the tool's complexity (12 parameters, no annotations, no schema descriptions), the description provides a strong conceptual model: it is a follow-up narrowing search that returns full blocks. It does not enumerate all parameters or explain return structure, but the output schema exists and the core usage context is clear. A 4 is appropriate because the description is complete enough for an agent to invoke it correctly in the intended workflow.

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%, so the description must compensate. It explains the central parameter (query_id) and the overall narrowing behavior (few files, source files, complete blocks), which maps to max_files, file_paths, and max_blocks. It does not explain every parameter, but it gives enough semantic context for an agent to infer the tool's purpose and use the key parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('search'), a resource ('focused context'), and a precise scope: it returns complete enclosing functions/classes/definitions rather than truncated snippets, and it is explicitly positioned as a follow-up to search_repo_context. This clearly distinguishes it from its sibling tool.

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

Usage Guidelines5/5

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

The description explicitly says 'Use this only after search_repo_context' and gives the condition ('when the relevant code is spread across multiple files and you need full enclosing functions...'). It also names the alternative (search_repo_context) and explains what this tool does differently, so an agent knows exactly when to choose it.

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