Skip to main content
Glama

Assign batch to delivery

assign_batch_to_delivery
Destructive

Put a ready batch in a delivery, or take it out. Pass deliveryId to assign, omit to unassign. Only a ready batch no delivery carries can be assigned. Take it out of its current delivery first. At a workflow run's Delivery stage, assigning every ready Batch of the run to one existing Delivery completes the stage instead of create_delivery. In a run of a workflow that starts at Delivery, adding any ready Batch no delivery carries to an existing Delivery completes the stage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batchIdYesReady Batch to assign or unassign.
metricsNoOptional client measurements, stored on the workflow step this call completes.
deliveryIdNoDelivery to assign to; omit to unassign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation risk is flagged. The description adds genuine behavioral context beyond that: assignment preconditions and the fact that assigning all ready batches completes a workflow Delivery stage.

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 and toggle, then preconditions, then workflow-stage nuance. The two workflow-stage sentences are long but carry real semantic weight rather than filler.

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?

No output schema exists, yet the description covers operation mode, preconditions, and workflow-stage side effects. The metrics parameter's storage behavior is left to the schema, which documents it, so the definition is essentially complete for a mutation tool.

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 schema already documents batchId, deliveryId, and the metrics object. The description's 'Pass deliveryId to assign, omit to unassign' largely restates the schema's own deliveryId description, adding little new parameter meaning.

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 ('Put a ready batch in a delivery, or take it out') and covers both directions of the operation (assign/unassign). It clearly distinguishes itself from the sibling create_delivery by describing the stage-completion alternative.

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 alternative (create_delivery) and the condition selecting it, states the toggle behavior for deliveryId, and lays out preconditions ('Only a ready batch no delivery carries can be assigned. Take it out of its current delivery first'). Nothing is left to inference.

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