Skip to main content
Glama

Check prepaid session balance & expiry

get_agent_session_status
Read-onlyIdempotent

Check remaining USD balance, call count, active status, and expiration timestamp for an x402s_ prepaid session token; returns 404 for unknown or expired tokens.

Instructions

Check remaining USD balance, call count, active status, and ISO expiration timestamp for an existing x402s_... prepaid session token minted via open_agent_session or https://apix402data.com/pay. Pass session_token (required x402s_... string). Returns active, remaining_usd, calls_made, and expires_at; returns HTTP 404/invalid error if the token is unknown or expired. Do not use to create a new session (use open_agent_session). Free and read-only (never consumes free-trial quota).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_token": "<session_token>"
    },
    "name": "get_agent_session_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_tokenYesPrepaid x402s_... session token to inspect.

Output Schema

NameRequiredDescriptionDefault
activeNo
endpointNo
calls_madeNo
expires_atNo
remaining_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds information the agent cannot get from them: the call is free and never consumes free-trial quota, and an unknown or expired token yields an HTTP 404/invalid error rather than a silent empty result. It also enumerates the returned fields (`active`, `remaining_usd`, `calls_made`, `expires_at`), which orients the agent before the output schema is read.

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 value proposition (what balance/status data is returned) and then the requirement, exclusion, error behavior, and cost note — all useful. Slightly heavy given an output schema already exists, so listing all four return fields is mildly redundant, but no sentence is filler.

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 one-parameter read tool with full annotations and an output schema, the description still covers the gaps that matter: precondition (existing minted token), cost (free, no quota consumption), error path (404/invalid on unknown or expired token), and the alternative for creation. Nothing an agent needs in order 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the single `session_token` parameter is already fully documented as a 'Prepaid x402s_... session token to inspect.' The description reinforces that it is required and must be an `x402s_...` string, but adds no new semantics beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 concrete verb and resource — check remaining USD balance, call count, status, and expiry for an existing `x402s_...` prepaid session token — and explicitly names the sibling that creates sessions (open_agent_session) as the wrong tool for that job. An agent can distinguish this read/inspect tool from the create tool without opening either schema.

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 a positive precondition (an *existing* token minted via open_agent_session or the payment URL) and an explicit exclusion: 'Do not use to create a new session (use open_agent_session).' That is both when-to-use and when-not-to-use with the alternative named.

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