Skip to main content
Glama

grep_messages

Search session messages by keyword to retrieve earlier discussions about specific topics, decisions, or findings.

Instructions

Search session messages by keyword. FTS5 full-text search across all messages.

AUTOMATIC TRIGGERS - Call this when:

  • Looking for a specific topic, decision, or finding mentioned earlier

  • You don't know the sequence number but remember keywords

  • Checking if a topic has been discussed in the session

SEARCH TIPS: Use simple keywords. FTS5 supports: "word1 word2" (AND), "word1 OR word2". Avoid complex syntax - use plain phrases.

PARAMETERS:

  • session_id: Session to search

  • pattern: Search term (use simple keywords)

  • agent_id: Your agent ID (must belong to the session)

  • limit: Max results (default: 50, max: 100)

  • msg_types: Filter by message types like ["result", "artifact"] (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
patternYes
agent_idYes
msg_typesNo
session_idYes
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It adds meaningful context: FTS5 semantics, OR/AND support, the agent_id membership requirement, a 100-result cap, and msg_types filtering. It does not describe the return format or ordering, which is a moderate gap for a tool without an output schema.

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?

The description is well-organized into core purpose, triggers, search tips, and parameter notes, with the main purpose front-loaded. It is slightly repetitive around the 'use simple keywords' advice, but each section earns its place and supports correct usage.

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

Completeness3/5

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

The description covers parameters, triggers, and search syntax well, which is strong given no annotations and 0% schema coverage. However, there is no output schema and the description does not explain what the search result looks like, how results are ordered, or how pagination beyond the limit field behaves; this leaves an agent to infer the return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate, and it does. Every parameter is explained with practical guidance, including the session scope, simple-keyword advice for pattern, the 'must belong to the session' requirement for agent_id, the default/max for limit, and an example for msg_types.

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 opens with a specific verb and resource: 'Search session messages by keyword' and clarifies the mechanism via FTS5 full-text search. The AUTOMATIC TRIGGERS section further distinguishes this tool from sequence-based message readers by stating it is for when you remember keywords but not the sequence number.

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 AUTOMATIC TRIGGERS section explicitly lists three situations that warrant calling this tool, such as looking for an earlier decision or checking whether a topic was discussed. It provides clear context for when to use it, though it does not explicitly name alternatives or state when not to use it.

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/Vedant9500/OpenLMlib'

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