Skip to main content
Glama

sort_entities

Reorders triggers, actions, fields, list items, and other Albato Builder entities in one call by applying the desired ID order across a version; validates IDs before writing and supports dry runs.

Instructions

Entity order in one call — up to 100 sorts in one version: triggers and actions (resource "triggers", "actions"), their fields ("actions/fields" with parentIds {actionId}), row sections, list items and anything that has sorting in the builder. An item is {resource, parentIds, ids}: ids — the desired order. You may list only some: the named ones move to the start in this order, the rest follow them as they were. First all items are validated (a foreign or repeated ID — rejection, nothing is written); the response shows the order before and after with names. Revert — revert_fixes by applyId (confirmed: true). dryRun: true — only show the result. Status handlers are not here: the API has no sorting for them; how to reorder them — describe_resource "status-handlers".

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": {
      "appId": "<appId>",
      "versionId": "<versionId>",
      "items": "<items>"
    },
    "name": "sort_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault
appIdYesApp ID
itemsYesSorts: [{resource, parentIds, ids}]
dryRunNoOnly show the order before and after, write nothing
versionIdYesVersion ID, shared by all items

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose key behaviors: all items are validated first, a foreign or repeated ID causes rejection with nothing written (atomicity), and the response shows before/after order with names. It also discloses the partial-ordering semantics (named IDs move to the start, the rest follow unchanged) and the dryRun no-write mode. However, it omits permission/editability prerequisites (e.g. whether the version must be editable via ensure_editable_version) and does not say what applyId is or where the caller obtains it for revert.

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?

Content is front-loaded: supported resources first, then item shape, partial-order semantics, validation behavior, revert and dryRun, exclusion last. It is dense but nearly every sentence adds new information; the dash-heavy compression and comma-spliced clauses make it slower to parse than necessary.

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 complex bulk-mutation tool with no output schema and no annotations, the description covers the response shape (before/after with names), atomicity, partial ordering, preview mode and the undo path. Remaining gaps are prerequisites (editable version/permissions) and the provenance of applyId used with revert_fixes, plus the un-enumerated resource tokens.

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 coverage is 100%, so the baseline is 3, and the description does add genuine meaning: items is {resource, parentIds, ids}; ids is the desired order and may be a subset; parentIds examples include {actionId} for "actions/fields". It nonetheless leaves 'resource' as an unexplained free-form string — the exact tokens for row sections and list items are never given — which is the one place schema-level documentation is thin.

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 establishes a specific verb+resource: reordering entities within one version of a builder app, and enumerates the sortable surfaces (triggers, actions, actions/fields with parentIds, row sections, list items). It also draws a clear negative boundary by excluding status handlers and redirecting to describe_resource "status-handlers", which separates it from generic tools like update_entities or apply_fixes. The only weakness is the fragmentary opener "Entity order in one call", which never says plainly 'reorder'.

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?

Usage context is concrete: up to 100 sorts in one version, partial lists allowed, dryRun for preview-only, and revert through revert_fixes by applyId with confirmed: true. It also names an explicit when-not (status handlers, use describe_resource instead). It stops short of contrasting with update_entities or explaining when a single-item update is preferable to a sort call.

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