Skip to main content
Glama

get_user_id_by_name

Fetch a Discord user ID by username or nickname within a server to format mentions using <@id>.

Instructions

Get a Discord user ID by username or nickname in a server for mention formatting (<@id>)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdNoDiscord server ID (defaults to DISCORD_GUILD_ID)
usernameYesUsername or nickname (e.g. "username" or "username#discriminator")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It omits the behaviors that matter most for a name-based lookup: whether the lookup is exact or fuzzy, what happens with ambiguous or non-unique usernames/nicknames, and what occurs when no match is found. Username ambiguity is a real risk in Discord and goes unmentioned.

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, tightly written sentence that front-loads the operation and appends the purpose. Nothing is wasted and no reader has to hunt for the point.

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 ideally state the return shape explicitly (it only implies an ID via '<@id>') and cover the not-found/ambiguous cases. It is adequate for the happy path but leaves behavioral edge cases for the agent to discover.

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 description coverage is 100%, so both parameters (username, guildId with its DISCORD_GUILD_ID default) are already documented in the schema. The description adds only the mention-formatting context, not format or matching semantics beyond what the schema states.

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 and resource (get a Discord user ID) plus the input basis (username or nickname) and the downstream use case (mention formatting). It is clear what the tool does, though it does not differentiate itself from siblings like search_members or get_user_info that could also resolve names to IDs.

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?

The phrase 'for mention formatting (<@id>)' implies the intended context, but there is no explicit when-to-use vs. when-not, and no guidance on choosing this over search_members, list_members, or get_user_info, all of which could plausibly resolve a user.

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

Deploy Server

Other Tools