Skip to main content
Glama

update_list_items

Update existing list items in Anaplan by specifying their IDs. Required code field prevents errors for items with code values.

Instructions

Update existing items in a list. Use get_list_items to find item IDs. Important: if an item has a code value, you must include the code field in the update or Anaplan returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesAnaplan workspace ID or name
modelIdYesAnaplan model ID or name
listIdYesList ID or name
itemsYesItems to update

Implementation Reference

  • MCP tool handler for 'update_list_items'. Defines Zod schema for inputs (workspaceId, modelId, listId, items with id/name/code/properties/parent/subsets), resolves IDs via NameResolver, and calls the API method updateListItems.
    server.tool("update_list_items", "Update existing items in a list. Use get_list_items to find item IDs. Important: if an item has a code value, you must include the code field in the update or Anaplan returns an error.", {
      workspaceId: z.string().describe("Anaplan workspace ID or name"),
      modelId: z.string().describe("Anaplan model ID or name"),
      listId: z.string().describe("List ID or name"),
      items: z.array(z.object({
        id: z.string().describe("Item ID (from get_list_items)"),
        name: z.string().optional().describe("New item name"),
        code: z.string().optional().describe("New item code"),
        properties: z.record(z.string(), z.string()).optional().describe("Updated properties"),
        parent: z.string().optional().describe("Parent item name for hierarchy placement"),
        subsets: z.record(z.string(), z.boolean()).optional().describe("Subset membership (subset name -> true/false)"),
      })).describe("Items to update"),
    }, async ({ workspaceId, modelId, listId, items }) => {
      const wId = await resolver.resolveWorkspace(workspaceId);
      const mId = await resolver.resolveModel(wId, modelId);
      const lId = await resolver.resolveList(wId, mId, listId);
      const result = await api.updateListItems(wId, mId, lId, items);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    });
  • API helper method 'updateListItems' that sends a PUT request to /workspaces/{wId}/models/{mId}/lists/{lId}/items with the items payload.
    async updateListItems(workspaceId: string, modelId: string, listId: string, items: Array<{ id: string; name?: string; code?: string; properties?: Record<string, string>; parent?: string; subsets?: Record<string, boolean> }>) {
      return this.client.put(
        `/workspaces/${workspaceId}/models/${modelId}/lists/${listId}/items`,
        { items }
      );
    }
  • src/server.ts:63-63 (registration)
    Registration call: registerTransactionalTools(server, transactional, resolver) wires up the tool handler to the MCP server.
    registerTransactionalTools(server, transactional, resolver);
  • NameResolver.resolveList helper that resolves list names/IDs via the ListsApi.
    async resolveList(workspaceId: string, modelId: string, nameOrId: string): Promise<string> {
      return this.resolve(`lists:${workspaceId}:${modelId}`, () => this.apis.lists.list(workspaceId, modelId), nameOrId, "List", "show_lists");
    }
  • AnaplanClient.put method that performs the HTTP PUT request used by updateListItems.
    async put<T = any>(path: string, body?: unknown): Promise<T> {
      return this.request<T>("PUT", path, body);
    }
Behavior4/5

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

With no annotations, the description discloses a key behavioral trait: if an item has a code value, the code field must be included in the update or an error occurs. This goes beyond a simple 'update' statement. However, it does not mention potential irreversibility or permissions.

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?

The description is two sentences: one for purpose and one for usage guidance and important constraint. No redundant information; every sentence earns its place.

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?

Given 4 required parameters and no output schema, the description covers the main purpose and a crucial edge case. It doesn't describe return values or error handling beyond the code note, but for a mutation tool this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds significant value by explaining the id parameter's purpose (from get_list_items) and highlighting the critical code field constraint, which is not obvious from the schema description alone.

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?

The description clearly states the tool updates existing items in a list, distinguishing it from sibling tools like add_list_items and delete_list_items. It also provides a prerequisite (use get_list_items) and a critical constraint about the code field.

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?

It explicitly guides to use get_list_items to find item IDs before updating, and warns about the code field requirement. While it doesn't explicitly state when not to use it, the sibling context and the description itself provide sufficient guidance.

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/larasrinath/anaplan-mcp'

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