Skip to main content
Glama

scan

Find every occurrence of an exact string in one session, in reading order, without ranking or regex. Use when you know the wording and need where it occurs.

Instructions

Find every occurrence of a literal string in one session — exhaustive, unranked, in reading order. For when you already know the wording and want where it occurs, rather than what a topic is about. Scope is one session and one spelling: a zero result clears only that.

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": {
      "needle": "<needle>",
      "session_id": "<session_id>"
    },
    "name": "scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast turn to scan, as the session's own seq. Omit to scan to the end of the session.
fromNoFirst turn to scan, as the session's own seq. Omit to start at the session's beginning; pass the seq a capped scan told you to continue from.
memoryNoMemory to scan, as it stands — `<org>/<repo>`, an `hf://…` URI, a local path, or `local`. Omitted, the server's memory, where a session this host has not finished pushing is read from the local memory.
needleYesThe literal string to find. Not regex — a pattern that silently matched nothing would read as a clean result.
contextNoCharacters of surrounding text shown on each side of a match
session_idYesSession to scan — the id from a `sessions` row or a recall hit's `→ get` line
ignore_caseNoMatch regardless of case

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.12.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv1.10.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the load and does disclose real behavior: results are exhaustive and unranked in reading order, matching is literal, and a zero result only clears that one session and one spelling — a valuable caution against over-reading negatives. It omits that results may be capped and need continuation via the `from` seq, which the schema only hints at.

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?

Three tightly packed sentences, each earning its place: behavior, selection criterion, and scope caveat, with the core verb front-loaded.

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 read tool with full schema coverage and no output schema, the description covers matching semantics, ordering, and scoping well. The main gap is truncation/cap behavior and how continuation interacts with `from`/`to`, which the description leaves to the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so parameter meaning is already well documented, including the literal-not-regex and continuation-seq semantics. The description reinforces the literalness and per-session scope but adds little parameter-level detail beyond the schema; baseline 3 applies.

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?

States a specific verb and resource — find every occurrence of a literal string in one session — plus the retrieval shape (exhaustive, unranked, reading order). The contrast with topical retrieval ('rather than what a topic is about') separates it from siblings like recall without naming them explicitly.

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?

Gives a clear selection condition: use when you already know the exact wording and want locations rather than subject matter. It doesn't name the alternative tool (recall) directly, so the agent must map the contrast itself, but the when-to-use signal is unambiguous.

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

Deploy Server

Other Tools