Skip to main content
Glama

get_outstanding

Recap the outstanding asks and obligations you sent, showing which messages remain unresolved and flagging overdue items from the sender’s pull source of truth.

Instructions

The SENDER's outstanding-ask recap + the pull source of truth for overdue drift (ADR-0011).

When to use: an orchestrator (or any sender) reconstructing what it is owed — on a fresh session, or any time it wants the current picture of asks/obligations it SENT that haven't been resolved. This PULL is the source of truth; the optional message.read/message.resolved webhooks are push-on-top and may be missed.

Behavior: returns the messages YOU sent with disposition in ('ask','obligation'), each with its sender-visible lifecycle state (undrained / drained-unresolved / resolved — a DELIVERY-PATH state: undrained means not drained through the consuming get_messages path, which is NOT the same as unread/unseen, since peek/CLI/direct-DB reads never stamp it) and a REPORT-ONLY overdue flag computed at query time — it NEVER mutates a message (report-first, never auto-resolve). LOG messages are excluded (LOG never goes overdue). overdue = still-unresolved AND past its bound: an obligation past its deadline, else an ask/deadline-less-obligation past created_at + RELAY_OVERDUE_SECONDS (default 24h, tunable). include_resolved=false (default) returns only the outstanding set; true adds resolved rows for the full sender view. Auth: agent token; sender-scoped (you only see mail you sent).

Returns: { success, agent, include_resolved, overdue_bound_seconds, count, overdue_count, outstanding: { id, to_agent, disposition, created_at, deadline, read_at, resolved_at, state, overdue, content_preview, content_truncated }[] }.

Errors: AUTH_FAILED, VALIDATION, RATE_LIMITED.

Input Schema

NameRequiredDescriptionDefault
agent_nameYesYour agent name — the SENDER whose outstanding asks/obligations to recap
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
include_resolvedNofalse (default) = only still-outstanding (unresolved) ask/obligation messages YOU sent — the recap. true = the full sender view incl. resolved rows (undrained/drained-unresolved/resolved).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include_resolved / description
      Previous value: -"false (default) = only still-outstanding (unresolved) ask/obligation messages YOU sent — the recap. true = the full sender view incl. resolved rows (unread/read-unresolved/resolved)."New value: +"false (default) = only still-outstanding (unresolved) ask/obligation messages YOU sent — the recap. true = the full sender view incl. resolved rows (undrained/drained-unresolved/resolved)."
  2. Added

TDQS

A4.8/5.0
Behavior5/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 so: it explains that the tool NEVER mutates (report-first), that `undrained` is a delivery-path state and NOT unread/unseen, that LOG messages are excluded, and the exact overdue computation including deadline precedence and the RELAY_OVERDUE_SECONDS default. Auth scope ('sender-scoped, you only see mail you sent') and error codes are also given.

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?

Front-loaded with the one-line purpose, then cleanly sectioned into When to use / Behavior / Returns / Errors. It is dense — nested parentheticals about delivery-path semantics and an ADR reference inflate it — but nearly every sentence carries load-bearing information, so it stays just short of 5.

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?

For a 3-parameter read tool with no output schema and no annotations, the description supplies everything: the exact return object shape, the state and overdue semantics, the optional-argument behavior, the auth model, and the error taxonomy. Nothing an agent needs to call this correctly is missing.

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 the baseline is 3, but the description adds real meaning: it clarifies that `include_resolved=false` is the 'outstanding set' while true adds resolved rows for the full sender view, and it reinforces that `agent_name` is the sender scope. The `agent_token` fallbacks are already in the schema, so the addition is incremental rather than complete.

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+resource: it returns the sender's outstanding ask/obligation recap, called out as 'the pull source of truth for overdue drift'. It also distinguishes itself from the sibling consuming path by naming get_messages explicitly, so an agent can separate this read-model from the drain path without opening schemas.

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?

Gives explicit when: 'an orchestrator reconstructing what it is owed — on a fresh session, or any time it wants the current picture'. It also names the alternative (message.read/message.resolved webhooks) and explains why to prefer this pull, calling the webhooks 'push-on-top and may be missed'. That is exactly the when/when-not/alternative triad.

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