Skip to main content
Glama
Aidress-ai
by Aidress-ai

set_agent_key

Store the session agent key in memory to authenticate update_agent, call_agent, and review_transaction without repeating the key on each call.

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.

On the hosted remote connector (api.aidress.ai), this key is stored in a process-wide slot shared by every remote caller currently connected — avoid this tool there. Instead send your own Authorization: Bearer header on the MCP connection itself; update_agent/call_agent/review_transaction read that per-request and it always wins over anything set here. This tool remains correct for a local single-user stdio server, where there is exactly one caller.

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 provided, the description fully discloses behavioral traits: key held in memory only, does not survive restart, not validated immediately (first auth call confirms), no-op if env var is set, and shared slot on remote connector. This goes far beyond the bare schema and gives the agent critical operational context.

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?

While longer than typical descriptions, every paragraph earns its place: purpose, usage timing, security rationale, env var precedence, remote-connector caveat, and parameter clarification. The structure is logical with clear section transitions, and there is no redundant repetition of schema data or annotations.

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 tool's security-sensitive nature and the complex interactions with environment variables, session lifetime, and remote vs local deployment, the description is exceptionally complete. It covers all necessary operational contexts, and since there is no output schema, it appropriately focuses on setup and caveats rather than return values.

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 input schema only shows 'agent_key' with no description (0% coverage). The description compensates fully by specifying the format ('aidress-agent-sk-...') and provenance ('returned by register_agent'), and distinguishes agent keys from org keys which cannot be set in-session.

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 states a specific verb+resource+scope: 'Store a bearer agent key for the duration of this MCP session.' It clearly distinguishes itself from sibling tools like register_agent (which creates the key) and rotate_agent_key (which changes it), and explains its role in enabling authentication for other 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?

Provides explicit when-to-use guidance: 'Use this immediately after register_agent returns an agent_key.' It also gives exclusions and alternatives: explains why not to pass keys per-call (security rationale), warns against use on the hosted remote connector (with specific alternative: send Authorization header), and clarifies env var precedence (AIDRESS_AGENT_KEY wins).

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