Skip to main content
Glama

whoami

Read-only

Who this connection is acting as: tenant, user (null if it cannot be resolved), role, and how it authenticated. Call this first when a tool asks for a user_id — the answer is usually 'you already are that user'. Under an API key the caller is the person who created the key.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "whoami"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real context beyond that: user can be null if it cannot be resolved, and API-key sessions resolve to the key creator. That null behavior and auth-resolution rule are exactly the kind of detail an agent would otherwise have to discover by calling.

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?

Three short sentences, front-loaded with what is returned, then the usage rule, then the API-key nuance. The aside 'the answer is usually you already are that user' is slightly colloquial but earns its place by telling the agent not to hunt for another user_id source.

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?

There is no output schema, so the description carries the return-value burden, and it does: it enumerates the fields returned and their null behavior. For a zero-parameter, read-only introspection tool, nothing an agent needs in order to call it correctly is missing.

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?

The tool takes zero parameters, so there is no parameter meaning to convey and the baseline of 4 applies. The description also implicitly signals the no-argument nature by framing the call as an identity lookup rather than a query.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states exactly what the tool returns: the tenant, user (with null semantics), role, and authentication method of the current connection. That is a precise identity-introspection purpose distinct from any sibling tool. It stops short of a crisp verb-first phrasing, but the resource and scope are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit when: call it first when another tool asks for a user_id, and it explains why (the answer is usually 'you already are that user'). It also clarifies that under an API key the caller is the key's creator. No alternatives or when-not-to-call conditions are given, but none are obviously needed for an identity probe.

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.