Skip to main content
Glama

Apply Directory Batch

apply_directory_batch
DestructiveIdempotent

Apply a directory batch of people, teams and memberships, only after review_directory_batch showed your user its exact changes and they approved. Pass that review's confirmation_token and the batch unchanged; a changed batch is refused. It applies atomically, once.

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": {
      "confirmation_token": "<confirmation_token>",
      "batch": "<batch>"
    },
    "name": "apply_directory_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
batchYesPeople, teams and memberships linked by ref; reference existing people and teams by user_id or team_id. The owner role can't be assigned here.
confirmation_tokenYesThe confirmation_token review_directory_batch returned for this exact batch.

Output Schema

NameRequiredDescriptionDefault
teamsYesEach team ref from the batch, mapped to its team ID.
peopleYesEach person ref from the batch, mapped to their user ID.
batch_idYesThe applied batch's ID.
replayedYesTrue when this key was applied before and the first result is returned again.
request_hashYesThe hash of the exact batch that was applied.
idempotency_keyYesThe batch's idempotency_key, as sent.
directory_link_idsYesIDs of the team directory links created or updated.
team_membership_idsYesIDs of the team memberships created or updated.
external_identity_idsYesIDs of the external handles created or updated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / batch / description
      Previous value: -"Atomic batch of people, teams and memberships linked by ref (include existing people/teams with user_id/team_id to reference them; owner role cannot be assigned here)."New value: +"People, teams and memberships linked by ref; reference existing people and teams by user_id or team_id. The owner role can't be assigned here."
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds non-obvious behavior: application is atomic, occurs once, and requires an unchanged batch with a matching token. It does not describe partial-failure recovery, permission requirements, or what happens to entries not listed in the batch, which keeps it below a 5.

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?

Three tight sentences, front-loaded with the action and its gating condition, with no repetition of schema or annotation content. Every clause carries a distinct constraint (precondition, token, immutability, atomicity).

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 destructive, nested-batch mutation with an output schema present, the description covers the gating workflow, immutability requirement, and atomic single-application semantics. Minor gaps remain around permissions and conflict handling on updates, but nothing an agent needs to invoke it correctly is missing.

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 100%, so baseline is 3, and the description earns an increment by adding a constraint the schema does not state: the batch must be passed unchanged or it is refused, and the token must come from that specific review. The nested batch structure itself is left entirely to the schema, which is appropriate.

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 a specific verb and resource ('Apply a directory batch of people, teams and memberships') and immediately scopes it to the post-review step, so it is unmistakable against the sibling review_directory_batch. An agent can tell exactly what this tool does without opening 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the prerequisite ('only after review_directory_batch showed your user its exact changes and they approved') and the alternative workflow, plus the hard precondition of passing that review's confirmation_token. The failure condition ('a changed batch is refused') is stated, so the agent knows what not to do.

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.