Skip to main content
Glama

whoami

Resolve your own agent identity from your token: returns agent name, role, capabilities, instance id, db path, host id and build info, so newly spawned agents can self-configure without being told.

Instructions

Ask the relay what YOU are — your own identity + instance, resolved from your token.

When to use: a freshly-spawned agent that was handed a token but not told its name, instance id, or DB path can discover them here instead of being told — the smallest step toward zero-config onboarding. No caller field: the presented token IS the identity, so the answer is always about YOU and never another agent.

Behavior: pure read. Returns your agent_name, role, capabilities, the resolved instance_id, db_path, and host_id, and build: the build the answering process loaded at start (its code and dependency ids, with commit, build time and node version). Auth: your own agent token (arg / X-Agent-Token header / RELAY_AGENT_TOKEN env).

⛔ SECURITY BOUNDARY — three facts are DELIBERATELY not returned and cannot be. Your TOKEN is stored only as a bcrypt hash, unrecoverable by construction (recover a lost token via relay recover on the filesystem, never over the wire). The operator http_secret / dashboard_secret are NOT an agent's to read — an agent token yielding an operator secret would be privilege escalation. The response type is closed so these can never appear in it.

Returns: { success: true, agent_name, role, capabilities, instance_id, db_path, host_id }.

Errors: AUTH_FAILED (no/invalid token), NOT_FOUND (the caller's agent row is absent).

Input Schema

NameRequiredDescriptionDefault
agent_tokenNoYour agent token. Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header. The token IS the identity; whoami reports the agent it belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it declares the operation 'pure read', enumerates three accepted auth channels, lists the returned fields including build provenance (commit, build time, node version), names the error codes, and explains a security boundary with the reasoning behind each withheld field (bcrypt-hashed token, operator secrets, closed response type).

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 front-loaded with labeled When-to-use / Behavior / Returns / Errors sections, and the security block is doing real work rather than padding. It loses a point for duplication (the return fields appear both in Behavior and again in a Returns line) and because that Returns line omits `build`, which Behavior promises.

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?

No output schema exists, yet the description lists the fields, the error codes, and the auth modes — enough for correct invocation. The only gap is the `build` field appearing in Behavior but missing from the enumerated Returns shape, a small inconsistency in the contract.

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

Parameters3/5

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

Schema coverage is 100% and the single parameter is optional, so the schema already documents the env/header fallbacks and the 'token IS the identity' semantics. The description restates rather than extends that, so it sits at the high-coverage baseline rather than adding new meaning.

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?

States a specific verb and resource in the first clause: 'Ask the relay what YOU are — your own identity + instance, resolved from your token.' It also implicitly distinguishes itself from the identity-listing siblings (discover_agents) by emphasizing the answer is always about the caller, never another 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?

Provides an explicit, concrete when-to-use scenario ('a freshly-spawned agent that was handed a token but not told its name, instance id, or DB path') and an explicit exclusion ('No caller field... never another agent'), which routes an agent away from trying to query someone else's identity.

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