Skip to main content
Glama

Open Kioku Regex Search

regex_search
Read-onlyIdempotent

Search indexed source code with a regular expression pattern to find exact line-level matches, including file path, line number, and matching content.

Instructions

Search indexed source code using a regular expression pattern, returning exact line-level matches with file path, line number, and matching line content for each hit. Use for exact regular-expression pattern matching against indexed source code lines. Best used after lexical or semantic search has narrowed the search area. Do NOT use for ranked keyword search (use search_code), for natural-language concept search (use semantic_search or hybrid_search), or for syntax-structure-aware queries (use structural_search). This is read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matching lines to return. Defaults to 20, capped at 100.
offsetNoNumber of matching lines to skip before returning results. Defaults to 0.
patternYesA valid regular expression pattern (Rust regex syntax) to match against indexed source code lines. Example: 'fn\s+main' to find main function declarations.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNoWrapped non-object output, used for Markdown, TOON, or scalar responses.
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds context about returning exact line-level matches and states it is read-only. No contradictions.

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 with no wasted words. It front-loads the purpose, then provides usage guidelines, all in a few sentences.

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

Completeness5/5

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

Given the tool has 3 well-described parameters, an output schema, and clear annotations, the description covers return format, use cases, and exclusions comprehensively. No gaps remain.

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 100%. The description adds extra context: pattern uses Rust regex syntax with an example, limit defaults to 20 capped at 100, offset defaults to 0. This enhances understanding beyond the schema.

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 searches indexed source code using a regular expression pattern and returns exact line-level matches with file path, line number, and content. It also distinguishes from siblings by mentioning alternative tools for different search types.

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 provides explicit when-to-use (exact regex matching after narrowing search area) and when-not-to-use (keyword, semantic, structural searches) with specific sibling tool names (search_code, semantic_search, hybrid_search, structural_search).

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/shivyadavus/open-kioku'

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