Skip to main content
Glama

show_lineitem_dimensions

Retrieve dimension IDs for a line item, required for writing data to cells or listing dimension items.

Instructions

List dimensions for a line item. Returns dimensionId values needed by write_cells and show_dimensionitems. Note: requires model ID (name resolution not supported).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelIdYesAnaplan model ID (name resolution not supported -- use show_models to find the ID)
lineItemIdYesLine item ID (from show_lineitems or show_alllineitems)

Implementation Reference

  • The actual tool registration and handler for 'show_lineitem_dimensions'. It calls apis.transactional.getLineItemDimensions(modelId, lineItemId) and returns the results as a table.
    server.tool("show_lineitem_dimensions", "List dimensions for a line item. Returns dimensionId values needed by write_cells and show_dimensionitems. Note: requires model ID (name resolution not supported).", {
      modelId: z.string().describe("Anaplan model ID (name resolution not supported -- use show_models to find the ID)"),
      lineItemId: z.string().describe("Line item ID (from show_lineitems or show_alllineitems)"),
    }, async ({ modelId, lineItemId }) => {
      const dims = await apis.transactional.getLineItemDimensions(modelId, lineItemId);
      return withNextSteps(
        tableResult(dims, [
          { header: "Name", key: "name" },
          { header: "ID", key: "id" },
        ], "dimensions"),
        ["Use show_dimensionitems with each dimensionId to get itemIds for write_cells."],
      );
    });
  • Input schema definition: expects modelId (string) and lineItemId (string) parameters, both using z.string().
    server.tool("show_lineitem_dimensions", "List dimensions for a line item. Returns dimensionId values needed by write_cells and show_dimensionitems. Note: requires model ID (name resolution not supported).", {
      modelId: z.string().describe("Anaplan model ID (name resolution not supported -- use show_models to find the ID)"),
      lineItemId: z.string().describe("Line item ID (from show_lineitems or show_alllineitems)"),
    }, async ({ modelId, lineItemId }) => {
      const dims = await apis.transactional.getLineItemDimensions(modelId, lineItemId);
      return withNextSteps(
        tableResult(dims, [
          { header: "Name", key: "name" },
          { header: "ID", key: "id" },
        ], "dimensions"),
        ["Use show_dimensionitems with each dimensionId to get itemIds for write_cells."],
      );
    });
  • The 'show_lineitem_dimensions' tool is registered via registerExplorationTools() which calls server.tool(...) on the McpServer instance.
    export function registerExplorationTools(server: McpServer, apis: ExplorationApis, resolver: NameResolver) {
  • The getLineItemDimensions API method that fetches dimensions for a line item from the Anaplan API endpoint /models/{modelId}/lineItems/{lineItemId}/dimensions.
    async getLineItemDimensions(modelId: string, lineItemId: string) {
      const res = await this.client.get<any>(
        `/models/${modelId}/lineItems/${lineItemId}/dimensions`
      );
      return res.dimensions ?? [];
    }
  • src/server.ts:54-57 (registration)
    The call to registerExplorationTools(server, {...apis...}, resolver) which wires up the exploration tools including show_lineitem_dimensions.
    registerExplorationTools(server, {
      workspaces, models, modules, lists, imports, exports, processes, files, actions, transactional, modelManagement, dimensions,
      calendar, versions, users,
    }, resolver);
Behavior3/5

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

No annotations are provided, so the description bears full burden. It discloses that it requires model ID and returns dimensionId values, and implies read-only behavior by listing. However, it does not mention any limitations, pagination, or potential side effects, leaving room for improvement.

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 consists of two concise sentences, front-loading the core action and then providing essential context about ID requirements and downstream usage. Every sentence is purposeful and there is no unnecessary verbosity.

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 the absence of an output schema and annotations, the description adequately explains the tool's purpose and output (dimensionId values). It could elaborate on the range of dimensions or potential errors, but for a straightforward listing tool, it is reasonably complete.

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?

The schema already has full coverage with descriptions for both parameters. The description adds value by explaining the modelId constraint (no name resolution) and specifying that lineItemId comes from show_lineitems or show_alllineitems, enhancing clarity beyond the schema.

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 'List dimensions for a line item', specifying both the verb and resource. It also notes the output is dimensionId values needed by write_cells and show_dimensionitems, differentiating it from siblings like show_dimensionitems.

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?

The description explains that model ID is required and name resolution is not supported, guiding the agent to first use show_models to get IDs. It also contextualizes the tool's output as needed by other operations, but does not explicitly list alternatives or when not to use.

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