Skip to main content
Glama

getUserByName

Read-onlyIdempotent

Fetches a user record by username so you can look up account details from an API-defined user directory.

Instructions

Get user by user name.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "username": "<username>"
    },
    "name": "getUserByName"
  }
}

Input Schema

NameRequiredDescriptionDefault
usernameYesThe name that needs to be fetched. Use user1 for testing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior2/5

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

The annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds nothing beyond that – it does not say what happens when no user matches, whether the lookup is exact or partial, or whether auth is required. With annotations doing all the work, this is a minimal contribution.

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?

One short front-loaded sentence with zero waste, appropriate in length for a trivial one-parameter read tool. It is terse rather than bloated, though the terseness borders on under-specification.

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?

For a simple key-lookup tool with one fully documented parameter, complete annotations, and no output schema, very little prose is strictly required. Still, the description omits not-found behavior and any note on match semantics, leaving small but real gaps.

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% for the single parameter, and the schema itself even supplies a testing hint ("Use user1 for testing"). The description adds no meaning beyond the schema, so baseline 3 applies.

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

Purpose3/5

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

"Get user by user name" states a verb and resource and indicates the lookup key is a username rather than an ID, which is a small differentiator from siblings like getOrderById. However, the sentence essentially restates the tool name and adds no scope detail (e.g., whether it searches all users, case sensitivity, or what a match returns).

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 guidance on when to use this versus alternatives such as getPetById or loginUser, and no mention of the expected workflow (e.g., retrieve a user before calling login). The agent must infer usage entirely from the tool name.

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