Skip to main content
Glama

get_next_unanswered

Read-only

Get the next inbox item that needs an answer, with the whole conversation and the post it is on, in one call. An item needs an answer when it is the customer's latest DM with no reply after it, or a comment/mention nobody replied to and that is not hidden. Order: DMs that can still be answered first (Instagram/Facebook DMs inside Meta's 24-hour window, the one closing soonest first, plus X DMs), then Instagram/Facebook DMs whose window has closed (reply_window.open = false: OmniSocials cannot reply, tell the user to answer from the native app or skip with mark_inbox_read), then comments and mentions, oldest first. Replies typed in the native apps count as answered (they are mirrored into the inbox), so a thread a colleague answered on their phone is not served again. Instagram mentions are skipped (no reply path). Only unread items are served by default: to skip one for good, mark_inbox_read it; pass include_read to also see read-but-unanswered items. Looks back 30 days. Loop: get_next_unanswered → draft a reply → reply_to_inbox with the conversation id, message_id = the served message's #id, and include_next: true → repeat until nothing is waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoOnly items of one type
orderNooldest (default): the item that has waited longest first; newest: the most recent first. Applies within each group (answerable DMs, then expired Instagram/Facebook DMs, then comments); the groups keep their order
excludeNoComma-separated conversation ids to leave out of this call (a temporary skip; up to 100)
platformNoOnly items from one platform
include_readNoAlso serve items that were marked read but never answered

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds substantial behavioral context the annotations cannot: the 30-day lookback, the three-tier ordering with 24-hour window logic, that native-app replies count as answered, and that Instagram mentions are skipped. However it does not state return format or pagination, so against a lower bar it is solid but not exhaustive.

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?

Long but front-loaded: the first sentence gives the core purpose and payload, and every subsequent sentence carries needed ordering, window, or loop semantics with no filler. The information density justifies the length for a tool with this much selection logic.

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?

There is no output schema, and the description compensates by stating the return payload (whole conversation plus the post) and the identifiers the agent needs for the follow-up call (conversation id, message #id). Combined with the lookback limit and ordering rules, an agent can invoke this correctly without further context.

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 semantic nuance beyond the schema: it explains that ordering preserves group order, that skip-via-exclude is temporary while mark_inbox_read is permanent, and clarifies include_read's role in the workflow.

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 ('get the next inbox item that needs an answer') and precisely defines the selection predicate (customer's latest unanswered DM, or unhidden unreplied comment/mention), which clearly separates it from list_inbox_conversations and get_inbox_conversation.

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?

Explicit when-to-use with a full decision flow: it defines what 'needs an answer' means, names the alternatives for skipping (mark_inbox_read for permanent, include_read for read items), tells the agent what to do when the reply window is closed, and closes with the get_next_unanswered → reply_to_inbox loop.

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