Skip to main content
Glama
elmapicms

elmapicms-mcp-server

Official
by elmapicms

Reorder Collections

reorder_collections

Reorder collections by assigning a new 0-based display order to each collection UUID. Provide an array of {uuid, order} objects.

Instructions

Update the display order of collections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionsYesArray of { uuid, order } objects

Implementation Reference

  • The async handler function for reorder_collections that receives { collections } (array of {uuid, order}) and posts to /collections/reorder endpoint.
    }, async ({ collections }) => {
      const result = await client.post("/collections/reorder", { collections });
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • Input schema for reorder_collections: an array of objects each with a uuid (string) and order (number).
    inputSchema: {
      collections: z
        .array(
          z.object({
            uuid: z.string().describe("Collection UUID"),
            order: z.number().describe("New display order (0-based)"),
          })
        )
        .describe("Array of { uuid, order } objects"),
    },
  • Registration of the 'reorder_collections' tool via server.registerTool within registerCollectionTools().
    server.registerTool("reorder_collections", {
      title: "Reorder Collections",
      description: "Update the display order of collections",
      inputSchema: {
        collections: z
          .array(
            z.object({
              uuid: z.string().describe("Collection UUID"),
              order: z.number().describe("New display order (0-based)"),
            })
          )
          .describe("Array of { uuid, order } objects"),
      },
    }, async ({ collections }) => {
      const result = await client.post("/collections/reorder", { collections });
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    });
  • src/index.ts:36-36 (registration)
    Top-level invocation of registerCollectionTools(server, client) which registers all collection tools including reorder_collections.
    registerCollectionTools(server, client);
  • The registerCollectionTools function definition that wires up the server and client for all collection tool registrations.
    export function registerCollectionTools(
      server: McpServer,
      client: ElmapiClient
    ): void {
Behavior2/5

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

The description only says 'update the display order' but does not disclose the effect on existing orders, whether it replaces the entire order, or any required permissions. No annotations are present to compensate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (6 words), which is concise but lacks important details. It earns its place but could benefit from more structure.

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

Completeness2/5

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

Given the absence of annotations and output schema, the description is insufficiently complete. It does not clarify the behavior of the order update, e.g., whether it is incremental or full replacement.

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?

The schema provides full documentation for the single parameter 'collections', including its structure and fields. The description adds no additional meaning beyond the schema.

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 clearly states it updates the display order of collections, which matches the title. However, it does not distinguish from sibling tools like update_collection, though the purpose is specific enough.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like update_collection or reorder_fields. No prerequisites or conditions are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/elmapicms/elmapicms-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server