Skip to main content
Glama

whoami

Identify which session this MCP connection runs as. Resolves the session ID from environment, messaging socket, live working directory, or request metadata.

Instructions

Who this MCP connection is running as. Resolves session id from env, messaging socket, or a unique live cwd match. Uses the session id the host sends in request _meta, then falls back to the host process when the harness passes no session env.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the resolution order (request _meta session id, then env, messaging socket, or cwd match, then host process fallback), which is genuinely useful behavioral context for a tool whose answer can vary by environment. It stops short of saying what is actually returned or whether resolution can fail ambiguously.

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

Conciseness3/5

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

Three sentences, with the purpose correctly front-loaded. However, the later two sentences are dense with implementation jargon (messaging socket, unique live cwd match) whose value to an agent choosing a tool is marginal and somewhat confusing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should clarify the return shape (a session id? a host name? cwd?), but it does not. The resolution mechanism is covered, yet an agent cannot predict what payload it gets back.

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 the baseline is 4. There is nothing for the description to disambiguate beyond the (absent) inputs.

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 first sentence states the resource precisely: identity of the current MCP connection. It's a recognizable verb+concept, though the description never distinguishes it from siblings like get_session or list_sessions, which also return session information.

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

Usage Guidelines2/5

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

There is no when-to-use guidance. The description explains how the session id is resolved but not when an agent should call whoami versus get_session or list_sessions, leaving the routing decision entirely to inference.

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