Skip to main content
Glama

set_agent_key

Store a bearer agent key for the current MCP session to authenticate subsequent agent operations without exposing the key in conversation history.

Instructions

Store a bearer agent key for the duration of this MCP session.

Use this immediately after register_agent returns an agent_key — it lets update_agent, call_agent, and review_transaction authenticate without restarting the server or changing environment variables.

Why not pass the key on each individual tool call? Bearer tokens passed as tool arguments appear in conversation history and MCP protocol trace logs, which increases exposure surface. Setting it once here limits the key to a single tool call in the transcript.

The key is held in memory only and does not survive a server restart. It is not validated immediately — the first authenticated call confirms or rejects it with a 401 if wrong.

AGENT_KEY env var always takes precedence over a key set here. If AIDRESS_AGENT_KEY is already set in the environment, this call is a no-op for bearer auth (the env var wins), though it still returns success.

agent_key — the aidress-agent-sk-... key returned by register_agent

To use an org key for update operations, set AIDRESS_API_KEY in the server environment before startup — org keys cannot be set in-session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_keyYes
Behavior5/5

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

With no annotations, the description fully discloses: key held in memory only, doesn't survive restart, not validated immediately, env var precedence, and that it returns success even if no-op.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections, though slightly verbose. Every sentence adds value, but some details could be more compact without loss.

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?

Given the simple input schema (1 param, no output schema), the description covers purpose, usage timing, side effects, and alternatives comprehensively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'agent_key' is fully described as the 'aidress-agent-sk-... key returned by register_agent', providing complete context beyond the schema's type-only definition.

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 stores a bearer agent key for the session duration, and distinguishes it from siblings by noting it should be used immediately after register_agent and enables other tools like update_agent and call_agent.

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?

Explicitly says 'Use this immediately after register_agent returns an agent_key' and explains why not to pass the key on each call, also mentions when it becomes a no-op due to environment variable.

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/Aidress-ai/Aidress'

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