Skip to main content
Glama
perfectra1n

kubesearch-mcp

by perfectra1n

Grep a cloned repository

repo_grep
Read-onlyIdempotent

Search a previously cloned repository for a substring, optionally restrict by glob, and get file paths, line numbers, and matching lines.

Instructions

Search the text contents of a previously cloned repository (by handle) for a substring. Optionally restrict to files matching a glob. Returns file paths, line numbers, and matching lines. If truncated is set, narrow the search with a longer query or a glob rather than paging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoOptional glob filter, e.g. '**/*.yaml'.
limitNoMax number of matching lines to return.
queryYesSubstring to search for across the repo's text files.
handleYesThe clone handle from repo_clone.
case_sensitiveNoMatch case-sensitively.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
handleYes
matchesYes
truncatedYes
total_matchesYes
Behavior4/5

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

Annotations already signal readOnly, idempotent, and closed-world behavior. The description adds valuable behavioral details: search scope ('text contents'), optional glob filtering, return format ('file paths, line numbers, and matching lines'), and truncation handling. This goes beyond annotation basics and helps the agent predict tool output.

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?

Three sentences, all informative. The first sentence captures the core action, the second adds an optional parameter, and the third provides practical usage advice. No filler or repetition; front-loaded and efficient.

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?

For a search tool with output schema and rich annotations, the description covers key contextual aspects: prerequisite (cloned repository), optional filter, return format, and behavior on truncation. It doesn't mention case_sensitive or limit explicitly, but the schema fully documents those, and the truncation guidance substitutes for deeper pagination details.

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 100%, with each parameter including a description, so the baseline is 3. The description does not significantly expand on parameter meaning beyond what the schema provides—it only restates 'by handle' and 'glob' in narrative form. No new parameter-level insight is added.

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') and a specific resource ('text contents of a previously cloned repository'), immediately distinguishing it from sibling tools like repo_list_files (list files) and repo_read_file (read one file). It also specifies the output (file paths, line numbers, matching lines), making the tool's purpose unambiguous.

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

Usage Guidelines4/5

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

The description implies the prerequisite of a prior repo_clone operation via 'previously cloned repository (by handle)', and offers explicit guidance for handling truncated results: 'narrow the search with a longer query or a glob rather than paging.' It does not explicitly mention when to use this over kubesearch_grep_values, but given sibling list and context, the usage is clear enough.

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/perfectra1n/kubesearch-mcp'

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