Skip to main content
Glama

latest_code

Retrieve the most recent verification code from a specified line, with optional sender or service filters. Returns false when no code has been received.

Instructions

The most recent verification code already on a line, or found: false if none has arrived. Use wait_for_code instead when the code has not been sent yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoOptional. Only consider senders containing this text, e.g. a short code.
lineIdYesThe line's id, from list_lines.
serviceNoOptional. Only consider messages Cleat attributed to this service, e.g. 'facebook'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that the tool returns found: false if no code has arrived, implying it does not wait or error, and clarifies that it only considers codes already present. It does not mention side effects, but the semantics strongly imply a read-only lookup; the main behavioral ambiguity is handled.

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?

Two sentences with no waste: the first states the core behavior and fallback, the second routes to the alternative when appropriate. The key behavioral constraint is front-loaded before the alternative reference.

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 simple read-style tool with three well-documented parameters and no output schema, the description is largely sufficient: it states what is returned, the no-result case, and the correct alternative when the code has not arrived. A precise return shape or example would strengthen it, but nothing critical is missing for correct invocation.

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%, with each parameter already documented including optionality and example semantics. The tool description adds no additional parameter detail, so the baseline score of 3 is appropriate.

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 states a specific verb and resource: it retrieves the most recent verification code already on a line, and explicitly includes the fallback behavior when none has arrived. It also distinguishes itself from the sibling wait_for_code, so an agent can tell them apart immediately.

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 gives clear usage guidance: use this tool when the code has already arrived, and explicitly directs the agent to wait_for_code when the code has not been sent yet. This directly addresses the main decision point between two sibling tools.

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