Skip to main content
Glama
voxmenthe

Search Tools MCP Server

by voxmenthe

contextual_keyword_search

Search for a keyword in a directory and retrieve surrounding context lines to analyze each match's role in the code.

Instructions

Search for a keyword in the current directory (wrapper around ripgrep).

Args: keyword (str): The keyword to search for (case insensitive). working_directory (str): The directory to search in. Use full absolute path. num_context_lines (int): The number of lines of context to return (both before and after the keyword). Default is 2.

Returns: str: The file path and the lines of context around the keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes
num_context_linesNo
working_directoryYes
Behavior3/5

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

With no annotations, the description carries the behavioral transparency burden. It discloses that the search is case-insensitive and that num_context_lines defaults to 2, and mentions 'wrapper around ripgrep,' implying standard ripgrep behavior. However, it does not specify details like recursion behavior, .gitignore handling, or how multiple matches are returned, which would be important for an agent to anticipate results.

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 concise and well-structured: a one-line summary followed by clearly formatted Args and Returns sections. Each line serves a purpose, with no fluff or redundancy. The organization makes it easy for an agent to parse quickly.

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 description covers the core purpose and parameters, but completeness is limited by the lack of output schema and annotations. The return value is only described vaguely as 'file path and lines of context,' with no indication of formatting, multiple match handling, or error behavior. Given the tool's simplicity, this is adequate but leaves room for clarification.

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

Parameters5/5

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

Despite 0% schema coverage, the description fully compensates by explaining every parameter: keyword (case insensitive), working_directory (use full absolute path), and num_context_lines (default 2, context before/after). This adds crucial meaning beyond the bare schema property names and types.

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 clearly states the tool's function: 'Search for a keyword in the current directory (wrapper around ripgrep)' and specifies it returns contextual lines. This distinguishes it from sibling tools like smart_code_search or get_repo_symbols, which focus on different search or analysis tasks. The verb+resource structure is specific and 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 is provided on when to use this tool versus alternatives like smart_code_search or get_repo_symbols. The description only explains what the tool does and its parameters, leaving the agent to infer usage context. There is no mention of when not to use it or how it compares to sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/voxmenthe/search-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server