Skip to main content
Glama

whoami

Read-onlyIdempotent

Checks the LMS session, re-authenticates when needed, and returns the current user ID.

Instructions

Check the LMS session (logging in again if needed) and return the user id.

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

Output Schema

NameRequiredDescriptionDefault
useridYes
login_pathYessession | sso | password: how the client got a live session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

The description adds real value beyond the annotations by disclosing an implicit side effect: it may re-authenticate the session if it has expired, which an agent needs to know before calling it in a sequence. This sits in mild tension with readOnlyHint=true, but since re-login creates a session rather than mutating LMS data, and idempotentHint=true covers repeated calls, it is not a genuine contradiction. It does not say how an authentication failure surfaces.

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?

A single short sentence with the purpose front-loaded and the conditional re-login parenthetically attached so it does not obscure the main action. No wasted wording.

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?

An output schema exists, so return-value detail is unnecessary, and the description correctly just names the key returned value. The only real gap for a session-management tool is failure behavior when credentials are absent or invalid, which is left unstated.

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 nothing for the description to disambiguate and the baseline applies. Nothing in the description misleads about arguments.

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?

States a specific verb+resource ("Check the LMS session") and the concrete outcome ("return the user id"), which is enough to distinguish it from all listed siblings like get_grades or list_courses. It stops short of explicitly naming that it is the identity/verification tool, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

Usage is implied by the description — an agent would infer this is the call to make when it needs to know who is authenticated. There is no explicit when-to-use/when-not guidance, no mention of prerequisites for the credentials it may need, and no statement about what happens if re-login fails.

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