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

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

Output Schema

NameRequiredDescriptionDefault
user_idNoThe user's ID (lowercase wallet address)
id_tokenNoNew ID token — use as Bearer token for Laso Finance APIs
expires_inNoToken lifetime in seconds
refresh_tokenNoNew refresh token — use for the next refresh

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew 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"
      +}
  2. 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
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond annotations, the description adds valuable behavioral context: 'free endpoint — no x402 payment required' and 'standard OAuth2 grant_type=refresh_token pattern.' It does not disclose refresh-token rotation or auth requirements, but the annotations and output schema cover the remaining safety profile.

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 short, front-loaded with the action, and every clause earns its place. The payment/cost note is a single useful addition, and the protocol reference is concise.

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 simple token-refresh endpoint, the description plus full parameter schema and output schema covers purpose, parameters, cost, and protocol. There is no significant missing information needed to call the tool correctly.

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%, and both parameters already have descriptive text: grant_type must be 'refresh_token' and refresh_token comes from a previous /auth or /get-card call. The description reinforces their purpose but adds little new parameter-level meaning, so 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 gives a specific verb and resource: 'Refresh an ID token' and 'Exchange a refresh token for a new ID token.' It is immediately clear what this tool does and how it differs from auth-related siblings by naming the OAuth2 refresh-token flow.

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 intended use is implied: use this when you have a refresh token and need a new ID token. However, there is no explicit 'use when' guidance or mention of alternatives such as exchange_api_key, so the agent must infer the selection context.

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