Skip to main content
Glama
NicolaSpadari

rest-api-mcp

rest_set_token

Set a bearer token for the session to authenticate REST API requests, resolving authorization when no token is already configured via environment variables.

Instructions

Set the bearer token for this session (persists until server restart). Token resolution: 1) project .env.mcp REST_BEARER_TOKEN, 2) MCP config env var, 3) session token via rest_set_token. If none found on 401/403, ask the user for a token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesThe bearer token value (without "Bearer " prefix)
Behavior4/5

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

With no annotations, the description carries full burden. It discloses persistence ('persists until server restart'), resolution order, and error handling behavior. It also clarifies the token format (without 'Bearer ' prefix). Minor omission: does not mention whether setting a token overwrites an existing one, but overall transparent.

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 tightly written—two concise sentences plus a resolution list. Every sentence adds information without redundancy. The main purpose is front-loaded, making it easy to parse.

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 single-parameter setter with no output schema, the description covers purpose, usage context, persistence, and error guidance. It could mention that the tool can be called multiple times (overwrites) or that it's memory-only, but overall it's sufficiently complete for the tool's simplicity.

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?

Schema coverage is 100% with a description for 'token'. The description adds value beyond the schema by specifying 'without "Bearer " prefix' and explaining the token resolution context where this parameter fits, which aids correct usage.

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 'Set the bearer token for this session', using a specific verb and resource. It distinguishes from sibling tools (e.g., rest_request for making requests) by focusing on token setup.

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 guidance on when to use this tool: it explains the token resolution order (project .env, MCP config env var, then this tool) and advises asking the user for a token on 401/403 errors if none found. This tells the agent exactly when to invoke it vs relying on other sources.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NicolaSpadari/rest_api_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server