Skip to main content
Glama

Grep Code (Kilo-Kit)

kilo_grep_code
Read-onlyIdempotent

Search workspace code for string or regex patterns, returning matching snippets and lines. Limit by root directory, case sensitivity, and max results for targeted code inspection.

Instructions

Search code snippets and matching lines across workspace files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch string or regex pattern
formatNomarkdown
searchNoAlias for query
isRegexNoWhether query is regex
patternNoAlias for query
rootDirNoSubdirectory or workspace path to limit search
sessionIdNoActive session ID from kilo_orchestrate_task.
maxResultsNoMax matches to return
caseSensitiveNoCase-sensitive match

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered by structured data. The description adds only a modest amount of context, conveying that results are line-level matches across the workspace, but says nothing about result caps, truncation, or the interaction with session state.

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?

It is a single front-loaded sentence with no redundancy or filler. It is arguably too terse for a 9-parameter tool, but nothing in it is wasted.

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 tool with 9 parameters, zero required fields, three interchangeable aliases, a format switch, an undocumented sessionId dependency, and no output schema, the description is far too thin. An agent is left unsure which alias to use, whether a query is effectively mandatory, or how sessionId affects the call.

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 89%, so the schema already documents nearly every parameter, including the three aliases query/search/pattern. The description adds no extra parameter meaning (no regex syntax, no scope semantics for rootDir), so the baseline of 3 applies.

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 gives a specific verb (search) and resource (code snippets / matching lines across workspace files), so the agent knows this is a content search rather than a filename search. However, it does not explicitly contrast itself with the sibling kilo_search_files, leaving the distinction between the two to inference.

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?

There is no when-to-use or when-not-to-use guidance, and no mention of alternatives such as kilo_search_files or kilo_read_file. The agent must guess whether to grep content directly or first locate files by name.

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