Skip to main content
Glama
ShiYioo

opencode_native_tools

by ShiYioo

grep

Use regular expressions to search file contents and find matching paths, line numbers, and lines. Optionally filter by file patterns like *.js.

Instructions

Fast regular-expression content search for codebases of any size. The optional include parameter filters searched files, for example *.js or *.{ts,tsx}. Returns matching paths, line numbers, and matching lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoThe directory to search in. Defaults to the current working directory.
includeNoFile pattern to include in the search (e.g. "*.js", "*.{ts,tsx}")
patternYesThe regex pattern to search for in file contents
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals return format (paths, line numbers, matching lines), performance ('fast'), and the filtering behavior of the include parameter. It omits details like case-sensitivity and .gitignore handling, but offers meaningful transparency for a grep-like tool.

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 three sentences with no redundant phrasing. Purpose is front-loaded, and each sentence contributes distinct information: core function, include filter example, and return value characteristics.

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 simple tool with full schema parameter descriptions and no output schema, the description covers purpose, filtering, and output. It lacks edge-case behavior (e.g., binary files, symbolic links), but these are not typically critical for grep usage. Overall, the description is adequately complete for an agent to invoke correctly.

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?

The schema already provides descriptions for all three parameters (100% coverage), so baseline is 3. The description adds value beyond the schema by giving concrete examples for the include parameter ('*.js', '*.{ts,tsx}'), which clarifies the expected format more precisely than the schema's 'File pattern to include'.

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 it performs 'Fast regular-expression content search for codebases', specifying a clear verb, resource, and method. This distinguishes it from sibling tools like glob (which likely handles filename patterns) by focusing on content matching.

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 conveys clear usage context (regex content search) and gives an example of the include parameter, but does not explicitly name alternatives or say when NOT to use the tool. It implies when to use it based on the 'content search' phrasing, which is sufficient for typical cases.

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/ShiYioo/opencode_native_tools'

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