Skip to main content
Glama

exchange_api_key

Exchange an API key for a session

Exchanges a durable lasoak_ API key for a short-lived id_token (one hour) plus a refresh_token, and returns an auth_url to hand your human so they can watch what you do. This is the first call an agent makes. The reply's id_token authenticates every other endpoint here.

If you have no key, your human creates one at https://laso.finance/agent/dashboard — there is no other way to obtain one.

Free.

Input Schema

NameRequiredDescriptionDefault
api_keyYesYour `lasoak_` API key.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. Added
  3. Removed
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare `readOnlyHint: false` and `destructiveHint: false`, but the description adds important context: it is a session-exchange that produces short-lived credentials (one hour), returns an `auth_url` so a human can monitor activity, and is a prerequisite for authenticating other endpoints. This is more informative than the bare annotations. A minor gap is that it does not explicitly state side effects like invalidating an older session, but this is not a strong deduction given the annotations are already present.

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 compact, front-loads the core exchange mechanism, states the token duration, the auth_url purpose, prerequisites, and fallback path, all in three short paragraphs. No unnecessary detail; the format 'Free.' is an oddity but does not hurt clarity. The wording is direct and every sentence adds value.

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?

The description covers the essential context: what is exchanged, what the tokens do, how long they last, the human-facing `auth_url`, and the fallback if no key exists. The output schema is present, so return values don't need to be elaborated. A slight deduction: the description does not clarify behavior on invalid or expired keys, but given the presence of a clear prerequisite and output schema, this is not a major shortfall.

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?

With 100% schema description coverage and a single required `api_key` parameter, the schema fully explains the parameter. The description enriches it by clarifying the expected format (`lasoak_`) and that the key is durable and must be created by a human if absent. That is valuable additional semantics beyond the bare schema, though the schema already uses the same `lasoak_` example.

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 exchanges a durable `lasoak_` API key for a short-lived `id_token` and `refresh_token`, and names the returned `auth_url` for human oversight. It also positions this as the first call an agent makes and that the `id_token` authenticates every other endpoint, which sharply distinguishes its purpose from other endpoints like `refresh_token` or `create_agent_api_key`.

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 explicitly says this is the first call an agent makes, that the resulting `id_token` authenticates all other endpoints, and that the only alternative to having a key is having the human create one at the dashboard URL. This tells an agent when to use this tool, that it must precede other calls, and what to do if no key is available.

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