Skip to main content
Glama

quotes

Find where users quoted prior agent messages and what they commented, by matching verbatim text in session history.

Instructions

User quotes of prior in-session content — the quotes preset.

One call answers "where did the user quote something the agent said, and what did they say about it?". When a user selects a chunk of a prior message and comments on it (the "attach selection as context" flow), the quoted text is embedded VERBATIM in their turn — no agent records it as a structured field — so it is recovered by matching the user turn against the text before it. A preset over the existing core, not a second engine: query scans supply user turns + assistant turns, the reviewed text is normalized (_normalize_rendered_text, reused from the plan-feedback anchorer) and :func:difflib.SequenceMatcher finds the longest verbatim run; a run below the minimum is not a quote (honest null), and text pasted from OUTSIDE the session matches nothing (never fabricated).

This is the cross-agent, chat-wide generalization of plan(feedback) (which surfaces «plan quote → user comment» only for Claude's plan-approval flow): quotes surfaces «any prior message quote → user comment» for every agent, operating on the normalized event stream, not client markup.

Filters (all parameters): agent, session (uuid or list), since/until (ISO bounds on the user turn's ts), source_kind (currently assistant — a user quoting the agent's prose; unknown values fail loud), noise and project_dir (session-level, same as query).

Each record carries the user_turn event id (context on-demand via query(relative_to=...)), source_id (the quoted assistant turn), source_kind, quote_chars, and the char-capped quote + comment (the user's turn with the quote elided). count/by_source_kind reflect the FULL matched set; limit (default 50, 0 = no cap) bounds only the emitted records (truncated).

Caveat (documented): v1 sources are assistant prose (the common case — quoting a tool's raw output is a future extension); the emitted quote/comment come from the NORMALIZED text (markdown stripped), so they are readable but not byte-identical to the raw turn (raw bodies stay reachable via the event ids). redact=true (default) masks secrets only in the emitted session_title/quote/comment. When count == 0 the response carries diagnostics so an empty result is explainable.

Thin wrapper over :func:ai_r.quotes.quotes that translates the core ValueError contract into the {"error": "invalid_argument", "message": str(exc)} shape the MCP client expects.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNo
limitNo
noiseNoinclude
sinceNo
untilNo
redactNo
sessionNo
project_dirNo
source_kindNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden and excels. It discloses the matching mechanism (normalization + SequenceMatcher), the honest null for runs below minimum, the no-fabrication guarantee, normalization caveats (markdown stripped, not byte-identical), redact behavior, limit/truncation semantics, and diagnostics on empty results.

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?

Though lengthy, the description is front-loaded with the core purpose and every sentence adds essential operational detail. It is well-structured into focused paragraphs covering filters, output records, caveats, and error contract—no filler or redundancy.

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

Completeness5/5

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

Given the tool's complexity (9 params, no annotations, rich output schema), the description is remarkably complete. It documents all filters, result fields, output behaviors (count, limit, truncated), edge cases (count == 0 diagnostics), and the error translation to invalid_argument, leaving no major usage gap.

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 syntax and semantics: session accepts uuid or list, since/until are ISO bounds on user turn timestamp, noise and project_dir mirror query, source_kind values fail loud, limit default 50 with 0 meaning no cap, and redact defaults to true masking secrets.

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+resource statement: 'User quotes of prior in-session content' and immediately answers the exact question the tool resolves. It explicitly distinguishes itself from sibling tools like plan(feedback), emphasizing it is the cross-agent generalization covering 'any prior message quote → user comment.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides direct when-to-use guidance: 'One call answers "where did the user quote something the agent said..."' and contrasts it with plan(feedback), which only covers Claude's plan-approval flow. It also gives clear parameter-driven usage context, such as source_kind currently only supporting assistant prose and failing loud on unknown values.

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/pro-target/ai-r'

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