Skip to main content
Glama

lookup_dimensionitems

Resolve dimension item names or codes to their IDs for use in data writes.

Instructions

Look up dimension items by name or code to get their IDs. Useful for resolving human-readable names to itemIds before write_cells.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesAnaplan workspace ID or name
modelIdYesAnaplan model ID or name
dimensionIdYesDimension ID (from show_lineitem_dimensions or show_viewdetails)
namesNoItem names to look up
codesNoItem codes to look up

Implementation Reference

  • Handler function for the lookup_dimensionitems tool. Resolves workspace/model by name/ID, calls the API to look up dimension items by name or code, and returns results in table format.
    server.tool("lookup_dimensionitems", "Look up dimension items by name or code to get their IDs. Useful for resolving human-readable names to itemIds before write_cells.", {
      workspaceId: z.string().describe("Anaplan workspace ID or name"),
      modelId: z.string().describe("Anaplan model ID or name"),
      dimensionId: z.string().describe("Dimension ID (from show_lineitem_dimensions or show_viewdetails)"),
      names: z.array(z.string()).optional().describe("Item names to look up"),
      codes: z.array(z.string()).optional().describe("Item codes to look up"),
    }, async ({ workspaceId, modelId, dimensionId, names, codes }) => {
      const wId = await resolver.resolveWorkspace(workspaceId);
      const mId = await resolver.resolveModel(wId, modelId);
      const items = await apis.dimensions.lookupByNameOrCode(wId, mId, dimensionId, names, codes);
      return tableResult(items, [
        { header: "Name", key: "name" },
        { header: "Code", key: "code" },
        { header: "ID", key: "id" },
      ], "matched items");
    });
  • Input schema for lookup_dimensionitems using Zod validation: workspaceId, modelId, dimensionId (required strings) and optional arrays of names and codes.
      workspaceId: z.string().describe("Anaplan workspace ID or name"),
      modelId: z.string().describe("Anaplan model ID or name"),
      dimensionId: z.string().describe("Dimension ID (from show_lineitem_dimensions or show_viewdetails)"),
      names: z.array(z.string()).optional().describe("Item names to look up"),
      codes: z.array(z.string()).optional().describe("Item codes to look up"),
    }, async ({ workspaceId, modelId, dimensionId, names, codes }) => {
  • API helper method that performs the actual HTTP POST to Anaplan API to look up dimension items by name or code, returning matched items.
    async lookupByNameOrCode(
      workspaceId: string,
      modelId: string,
      dimensionId: string,
      names?: string[],
      codes?: string[],
    ) {
      const res = await this.client.post<any>(
        `/workspaces/${workspaceId}/models/${modelId}/dimensions/${dimensionId}/items`,
        { names, codes }
      );
      return res.items ?? [];
    }
  • src/server.ts:54-57 (registration)
    Registration call: lookup_dimensionitems is registered via registerExplorationTools in server.ts, which calls server.tool() inside exploration.ts.
    registerExplorationTools(server, {
      workspaces, models, modules, lists, imports, exports, processes, files, actions, transactional, modelManagement, dimensions,
      calendar, versions, users,
    }, resolver);
  • Export function that registers all exploration tools including lookup_dimensionitems on the MCP server instance.
    export function registerExplorationTools(server: McpServer, apis: ExplorationApis, resolver: NameResolver) {
Behavior3/5

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

No annotations are provided, so the description must carry the burden. It states a read-style operation (look up) but does not confirm it is non-destructive or mention any side effects, authentication, or rate limits. The description is adequate but lacks explicit behavioral disclosure.

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 with no fluff. The main action is front-loaded, and every sentence adds value. It is appropriately sized for the tool's complexity.

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 tool's simplicity and full schema coverage, the description is nearly complete. It explains the purpose and usage context, but does not specify the return format or pagination behavior. No output schema exists, so a brief note on return structure would enhance completeness.

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 baseline is 3. The description adds contextual purpose ('resolving human-readable names to itemIds') but does not add meaning to individual parameters beyond what the schema already provides.

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 verb (look up), resource (dimension items by name or code), and outcome (get IDs). It also distinguishes from sibling tools like show_dimensionitems by specifying a use case (before write_cells).

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 explicitly advises when to use the tool ('before write_cells'), implying it is a preparatory step. It does not explicitly list alternatives or when not to use, but the guidance is clear and relevant.

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