Skip to main content
Glama

Search Context

rlm_search_context
Read-onlyIdempotent

Search long contexts with regex to locate relevant sections, returning matches with surrounding context and line numbers for quick review.

Instructions

Search context using regex patterns.

Returns matches with surrounding context and line numbers. Use this to find relevant sections before reading in detail.

Examples:

  • Pattern: "error|warning" - Find all errors and warnings

  • Pattern: "function\s+\w+" - Find function definitions

  • Pattern: "TODO|FIXME" - Find code comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flagsNoRegex flags (default: gi for global case-insensitive)gi
patternYesRegex pattern to search for
context_idNoContext identifiermain
session_idNoSession ID
max_resultsNoMaximum results to return
context_charsNoCharacters of surrounding context to include
include_line_numbersNoInclude line numbers in results
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds behavioral details about return format ('surrounding context and line numbers') and usage context, which enriches transparency without contradicting annotations.

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: a one-sentence primary purpose, a two-sentence output/usage note, and three examples. It is front-loaded, contains no filler, and every line contributes meaning.

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 7-parameter tool with no output schema, the description covers purpose, output, and usage context. It could more explicitly define what 'context' refers to, but sibling tools and examples provide enough context for an AI agent to select and invoke it 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?

Schema coverage is 100%, so baseline is 3. The description adds valuable semantics through concrete pattern examples (e.g., 'error|warning' for errors/warnings), which clarifies how to use the 'pattern' parameter beyond the schema's bare definition. This lifts it above baseline.

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 context using regex patterns.' The verb 'search' and resource 'context' are specific, and examples differentiate it from siblings like rlm_find_all by emphasizing surrounding context and line numbers.

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 provides explicit usage guidance: 'Use this to find relevant sections before reading in detail.' This implies when to use it over full reads, but it does not explicitly name alternatives or state when not to use it, so it misses the top score.

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/win10ogod/RLM-MCP'

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