Skip to main content
Glama

refresh_token

Refresh an ID token

Exchange a refresh token for a new ID token. This is a free endpoint — no x402 payment required. Uses the standard OAuth2 grant_type=refresh_token pattern.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
grant_typeYesMust be "refresh_token"
refresh_tokenYesThe refresh token received from a previous /auth or /get-card call

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "expires_in": {
      -      "description": "Token lifetime in seconds",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "id_token": {
      -      "description": "New ID token — use as Bearer token for Laso Finance APIs",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "refresh_token": {
      -      "description": "New refresh token — use for the next refresh",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "user_id": {
      -      "description": "The user's ID (lowercase wallet address)",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  2. First observed

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits itself. It does state that this is a 'free endpoint — no x402 payment required,' which is a useful behavioral note. However, it does not mention side effects (e.g., whether the old refresh token is invalidated), rate limits, or error conditions. The disclosure is minimal but not misleading.

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?

The description is two sentences long, front-loaded with the purpose, and includes a key differentiator (free endpoint) without unnecessary fluff. Every sentence earns its place, making it efficient and easy to scan.

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 two-parameter tool with fully documented schema and no output schema, the description covers the purpose, the OAuth2 pattern, and the free endpoint aspect. It does not describe the response format explicitly, but the phrase 'new ID token' implies the output. Minor gaps like potential errors or token rotation behavior are not critical for a straightforward refresh operation.

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?

The input schema already documents both parameters thoroughly (grant_type enum and refresh_token description). The description adds no additional parameter-level detail; it only mentions the tool's free status and OAuth2 pattern. Since schema coverage is 100%, the baseline of 3 applies.

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 clearly states the tool's function: 'Refresh an ID token' and 'Exchange a refresh token for a new ID token.' This is a specific verb and resource, distinguishing it from sibling tools like get_auth_link or agent_auth, which handle initial authentication flows. The purpose is unambiguous.

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

Usage Guidelines3/5

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

The description implies usage by referencing the standard OAuth2 grant_type=refresh_token pattern and the schema notes the refresh token comes from a previous /auth or /get-card call. However, it does not explicitly state when to use this over alternatives, nor does it exclude use cases like initial authentication. The guidance is implied rather than explicit.

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