show_dimensionitems
List items in an Anaplan dimension and return itemId values needed for write_cells dimension coordinates.
Instructions
List all items in a dimension. Returns itemId values needed for write_cells dimension coordinates. Note: requires model ID (name resolution not supported).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modelId | Yes | Anaplan model ID (name resolution not supported -- use show_models to find the ID) | |
| dimensionId | Yes | Dimension ID (from show_lineitem_dimensions or show_viewdetails) | |
| limit | No | Max items to return (default 50, max 1000) | |
| search | No | Filter by name or ID (case-insensitive substring match) |
Implementation Reference
- src/tools/exploration.ts:501-512 (handler)The tool handler for 'show_dimensionitems' — registers the tool with server.tool, defines the schema (modelId, dimensionId, limit, search), calls apis.dimensions.getAllItems, and returns a formatted table of dimension items (name, code, id).
server.tool("show_dimensionitems", "List all items in a dimension. Returns itemId values needed for write_cells dimension coordinates. 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)"), dimensionId: z.string().describe("Dimension ID (from show_lineitem_dimensions or show_viewdetails)"), ...paginationParams, }, async ({ modelId, dimensionId, limit, search }) => { const items = await apis.dimensions.getAllItems(modelId, dimensionId); return tableResult(items, [ { header: "Name", key: "name" }, { header: "Code", key: "code" }, { header: "ID", key: "id" }, ], "dimension items", { limit, search }); }); - src/tools/exploration.ts:501-512 (schema)Input schema for show_dimensionitems: modelId (string), dimensionId (string), limit (optional number), search (optional string).
server.tool("show_dimensionitems", "List all items in a dimension. Returns itemId values needed for write_cells dimension coordinates. 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)"), dimensionId: z.string().describe("Dimension ID (from show_lineitem_dimensions or show_viewdetails)"), ...paginationParams, }, async ({ modelId, dimensionId, limit, search }) => { const items = await apis.dimensions.getAllItems(modelId, dimensionId); return tableResult(items, [ { header: "Name", key: "name" }, { header: "Code", key: "code" }, { header: "ID", key: "id" }, ], "dimension items", { limit, search }); }); - src/tools/exploration.ts:501-512 (registration)Registration via server.tool("show_dimensionitems", ...) within the registerExplorationTools function (line 77).
server.tool("show_dimensionitems", "List all items in a dimension. Returns itemId values needed for write_cells dimension coordinates. 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)"), dimensionId: z.string().describe("Dimension ID (from show_lineitem_dimensions or show_viewdetails)"), ...paginationParams, }, async ({ modelId, dimensionId, limit, search }) => { const items = await apis.dimensions.getAllItems(modelId, dimensionId); return tableResult(items, [ { header: "Name", key: "name" }, { header: "Code", key: "code" }, { header: "ID", key: "id" }, ], "dimension items", { limit, search }); }); - src/api/dimensions.ts:6-11 (helper)The getAllItems API method that makes the actual HTTP GET call to /models/{modelId}/dimensions/{dimensionId}/items.
async getAllItems(modelId: string, dimensionId: string) { const res = await this.client.get<any>( `/models/${modelId}/dimensions/${dimensionId}/items` ); return res.items ?? []; } - src/tools/exploration.ts:40-43 (helper)paginationParams shared schema definition used by show_dimensionitems (limit and search fields).
const paginationParams = { limit: z.number().optional().describe("Max items to return (default 50, max 1000)"), search: z.string().optional().describe("Filter by name or ID (case-insensitive substring match)"), };