Skip to main content
Glama

ConductScience library

Find lines in library records

grep
Read-onlyIdempotent

The lines of records that match a pattern, each with its citation address. Give a path, or a database and words: grep then reads the records that search finds. Patterns are regular expressions without back-references.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pattern": "<pattern>"
    },
    "name": "grep"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoWith database: how many records, 1 to 20; 10 when not given.
pathNoA library path, such as /, /papers/, /papers/9500320/ or /papers/9500320/content.lines.
fixedNoMatch the pattern as plain text.
wordsNoWith database: the search whose records grep reads.
patternYesA regular expression, or plain text with fixed.
databaseNoThe database, by the name ls / lists it under.
ignore_caseNoMatch upper and lower case alike.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare the full safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description adds two genuinely useful behavioral facts beyond them: results carry a citation address, and patterns are regular expressions without back-reference support, which is a real limitation that could otherwise cause silent failures.

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?

Three short sentences with no filler, and the output shape is front-loaded before the input modes. The elliptical sentence fragments ("Give a path, or a database and words") are terse at the cost of some reading friction, but nothing is wasted.

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?

With seven parameters and no output schema, the description still explains what comes back (matched lines with citation addresses) and the regex constraint. It does not address whether path and database may be combined or what happens on an invalid pattern, but the agent has enough to call 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, but the description adds framing the schema does not: that path and database+words are alternative targeting modes rather than combinable inputs, and that fixed switches the pattern from regex to plain text. The interplay of n with the database mode remains only in the schema.

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 states the operation precisely: it returns the lines of records matching a pattern, each paired with its citation address. Sentence two also distinguishes it from the sibling search tool by explaining that grep reads the records search finds, so an agent can see the filtering-vs-locating distinction without opening another schema.

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?

It gives the two concrete invocation modes (a path, or a database plus words) and states the prerequisite that words must come from a prior search, which is real when-to-use guidance. It stops short of explicit when-not-to-use or naming the sibling tools an agent should prefer for retrieval versus line matching.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources