Skip to main content
Glama

Create or get a Sophia user (import)

import_ensure_user
Idempotent

Creates a person record by email if none exists, optionally marked deactivated for former authors; returns the existing person unchanged when the email is already present. No password or email is sent.

Instructions

Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Make sure a person exists, by email. No password and no mail is created: an imported person later signs in with SSO (linked by verified email) or, in local mode, with "forgot password". If the email already exists it returns that person WITHOUT changing them. Use deactivated=true for people who left the company but authored content.

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": {
      "email": "<email>",
      "first_name": "<first_name>",
      "last_name": "<last_name>"
    },
    "name": "import_ensure_user"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailYes
last_nameYes
first_nameYes
deactivatedNo
display_nameNoDefaults to first and last name.

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?

Beyond the annotations (which only declare non-readOnly, idempotent, non-destructive), it discloses that nothing is emailed or notified, no per-row audit events are written, and no password or mail is created. It also explains the SSO/local-mode sign-in path and the no-op behavior on existing emails. These are real behavioral disclosures the annotations do not carry.

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?

Dense but every sentence carries information, and the idempotent no-op behavior is stated plainly. The auth requirement is front-loaded before the purpose, which is a slightly awkward ordering but not wasteful.

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 five-parameter mutation-style tool with no output schema, it covers permissions, side effects, idempotency, and the deactivation use case. It does not describe what the returned person representation looks like, but the annotations already cover the safety profile.

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 low (20%), so the description must compensate. It adds meaning for the email matching key and the deactivated flag's intent, but says nothing about first_name/last_name constraints or display_name behavior beyond what the schema already 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?

The description states a specific create-or-get semantic for a person keyed by email ("Make sure a person exists, by email") and clarifies that an existing email yields the existing person unchanged. It is clear on its own, but it never names the sibling lookup tool (import_find_users) as the alternative for read-only discovery.

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 gives concrete usage context: requires an import:write token owned by a global admin, and explicitly prescribes deactivated=true for people who left the company but authored content. It lacks an explicit when-not/alternative pointer, so it stops short of a 5.

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