Skip to main content
Glama

scan

Find every occurrence of a literal string in one session, in reading order, to locate all exact matches when you know the wording, not ranked topic results.

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.

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. First observedv1.10.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses result ordering ('unranked, in reading order'), completeness guarantees ('exhaustive'), and the negative-result semantics ('a zero result clears only that session and spelling') — a genuinely non-obvious caveat. It stops short of describing whether output can be capped or paginated, even though the schema's 'from' description alludes to a capped scan needing continuation, and it says nothing about the response shape; those are the remaining gaps.

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 tight sentences, front-loaded with what the tool does before the when-to-use clause and the scope caveat. No filler, and the ordering of information matches the order an agent needs it.

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, no-annotation, no-output-schema tool, the description covers purpose, ordering, literal-vs-regex, and the crucial limits of a zero result. The one meaningful omission is that it never says results may be capped or how continuation via 'from' works, leaving the agent to discover that from the schema alone.

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 coverage is 100%, so every parameter is already documented in structured form, setting the baseline at 3. The description reinforces two points beyond the schema — that matching is literal, not regex, and that scope is one session and one spelling — but adds nothing about 'from'/'to' seq semantics or 'context' sizing that the schema does not already say.

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?

States a specific verb and resource ('Find every occurrence of a literal string in one session') plus scope qualifiers (exhaustive, unranked, reading order). It gestures at the sibling it is not — topical lookup via recall — with 'rather than what a topic is about', but never names 'recall' or the other siblings, so differentiation is inferential rather than explicit.

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 rule: use this when you already know the wording and want locations, not when you want to know what a topic is about. The exclusion is stated as a condition, though the alternative tool is not named, so the agent must map the contrast to 'recall' itself.

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