Skip to main content
Glama

Assign or unassign a lead

assign_lead
DestructiveIdempotent

Assign or unassign a lead

Assigns the lead to a teammate, or unassigns it with "assigned_to": null. The teammate must be able to open the agent: a user_id from listAgentMembers with can_open_agent: true (422 assignee_not_allowed otherwise). The lead's conversation is assigned with it. Assigning a lead to the teammate it already has is allowed. Mojeeb records the assignment as made by the person who created the key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional: why, kept with the assignment in Mojeeb's records. Can't contain angle brackets.
lead_idYesA lead of the agent. Another agent's lead is `404 not_found`.
agent_idYesThe agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`.
assigned_toYesThe teammate to assign it to: a `user_id` from `listAgentMembers` whose `can_open_agent` is true. `null` unassigns it. Required, so an empty body never unassigns by accident.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly=false, idempotent=true and destructive=true, and the description adds real context beyond them: the assignment cascades to the lead's conversation, an empty body can never accidentally unassign, and the audit record is attributed to the key's creator. That is exactly the mutation semantics an agent needs and cannot infer from the hints.

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?

Front-loaded with the core action, then preconditions and edge cases in descending order of importance. The opening line duplicates the title, and the closing note about Mojeeb recording the assigner is tangential but short.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no output schema, the description supplies the missing pieces an agent needs: unassign path, assignee eligibility rule, error codes, idempotent re-assign behavior, and side effects on the conversation.

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 the baseline is 3. The description's notes on `assigned_to` (null unassigns, must be a can_open_agent member) largely restate what the schema property descriptions already say, and the `reason` parameter is not elaborated at all.

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?

States the specific verb+resource and immediately covers both directions of the operation, including the exact unassign trigger (`"assigned_to": null`). It is clearly distinguishable from the sibling assign_conversation (leads vs conversations) without opening either 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?

Explicitly names the precondition (the `user_id` must come from `listAgentMembers` with `can_open_agent: true`) and the failure mode (`422 assignee_not_allowed`), plus the edge case that re-assigning to the same teammate is allowed. It doesn't spell out when to prefer this over other lead tools, but the dependency routing is strong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources