Skip to main content
Glama

Refresh Auth Token

get_new_auth_token

Get a fresh auth token when another tool fails with an authorization error. Pass the user's current refresh_token; returns a new auth_token/refresh_token pair to use on the retried call and on later calls. Call this only in response to an auth failure, not preemptively.

Args:
    new_token_input: contains the user's refresh token

Returns:
    a new auth_token and refresh_token pair, or an error if the refresh token is
    missing or invalid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_token_inputYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "NewTokenInput": {
      -    "properties": {
      -      "refresh_token": {
      -        "description": "a  token used to refresh expired auth token provided by previous calls to analyze_bill or create_manual_bills",
      -        "pattern": "^r:[a-z0-9]{32}$",
      -        "title": "Refresh Token",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "refresh_token"
      -    ],
      -    "title": "NewTokenInput",
      -    "type": "object"
      -  }
      -}
    • removedInput schema / properties / new_token_input / $ref
      Removed value: -"#/$defs/NewTokenInput"
    • addedInput schema / properties / new_token_input / properties
      Added value: +{
      +  "refresh_token": {
      +    "description": "a  token used to refresh expired auth token provided by previous calls to analyze_bill or create_manual_bills",
      +    "pattern": "^r:[a-z0-9]{32}$",
      +    "title": "Refresh Token",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / new_token_input / required
      Added value: +[
      +  "refresh_token"
      +]
    • addedInput schema / properties / new_token_input / title
      Added value: +"NewTokenInput"
    • addedInput schema / properties / new_token_input / type
      Added value: +"object"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations provide only readOnlyHint=false and destructiveHint=false, so the description adds valuable context by explaining that it returns a new token pair and can error if the refresh token is invalid. It doesn't contradict annotations and goes beyond their minimal information.

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 front-loaded with the core purpose, followed by concise usage instructions and return value expectations. Every sentence earns its place, with no redundant information.

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?

The description fully covers when to use the tool, what input to provide, and what to expect as output. The presence of an output schema further helps, but the description itself is complete for this simple auth-refresh tool.

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?

Although schema description coverage is 0%, the description explicitly mentions 'Pass the user's current refresh_token' and defines new_token_input as containing the refresh token. This compensates for any missing schema descriptions and gives clear semantic meaning to the parameter.

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 purpose: 'Get a fresh auth token when another tool fails with an authorization error.' It specifies the verb (get), resource (auth token), and the triggering context, which distinguishes it from sibling billing tools.

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 provides explicit usage guidance: 'Call this only in response to an auth failure, not preemptively.' It also explains the input needed (refresh_token) and the expected outcome, giving a clear when-to-use scenario.

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