Skip to main content
Glama

upsert_user

Create a new user or update an existing one by providing a user_id; changes are staged as a preview until you apply them.

Instructions

Create or update a user. Provide user_id to update an existing user. Returns a change_id; nothing changes until apply_change.

Args: name: The user's display name. email: Email address (used for login with password auth). role: One of Owner, FullAdministrator, LimitedAdministrator, User. status: One of Active, Disabled. user_id: UUID to update an existing user; omit to create a new one. username: Optional login username.

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": {
      "name": "<name>"
    },
    "name": "upsert_user"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
roleNo
emailNo
statusNo
user_idNo
usernameNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the disclosure burden, and it does deliver the key non-obvious trait: the call only stages a change_id and nothing mutates until apply_change. It omits other important behavior such as required privilege level, whether unspecified fields are cleared on update, and how duplicate emails are handled.

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?

Purpose and the critical apply_change caveat are front-loaded, followed by a compact args block with one line per parameter. The docstring-style Args formatting is slightly verbose but nothing is padded or redundant.

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?

For a six-parameter mutation tool with an output schema covering change_id, the description supplies the parameter meanings and the deferred-apply model an agent needs. What is missing is authorization/permission context and update-side-effect details, which matter more here because no annotations exist.

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?

Schema description coverage is 0%, so the description must compensate, and it documents all six parameters including the enumerated role and status values and the login semantics of email. The remaining gap is that enum casing/validation rules and the interplay between email and username are not fully resolved.

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

Purpose5/5

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

The first two sentences state a specific verb pair and resource (create or update a user) and immediately explain the branch condition: supply user_id to update, omit it to create. An agent can distinguish the two modes without reading the schema.

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 clearly frames create-vs-update selection via user_id and names the required follow-up tool (apply_change), which routes the agent correctly through a two-step workflow. It stops short of excluding siblings such as delete_user or get_user, but the selection logic within the tool itself is explicit.

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