close_model
Close an Anaplan model to archive it. Requires workspace admin and must be done before bulk deletion of models.
Instructions
Close (archive) a model. Requires workspace admin. Must be closed before bulk_delete_models.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Anaplan workspace ID or name | |
| modelId | Yes | Anaplan model ID or name |
Implementation Reference
- src/tools/bulk.ts:299-304 (handler)The async handler function that executes the close_model tool logic: resolves workspace/model IDs, calls modelManagement.close(), and returns a success message.
}, async ({ workspaceId, modelId }) => { const wId = await resolver.resolveWorkspace(workspaceId); const mId = await resolver.resolveModel(wId, modelId); await apis.modelManagement.close(wId, mId); return { content: [{ type: "text" as const, text: `Model ${mId} closed successfully.` }] }; }); - src/tools/bulk.ts:296-298 (schema)The tool registration with Zod schema defining two string parameters (workspaceId, modelId) and a description.
server.tool("close_model", "Close (archive) a model. Requires workspace admin. Must be closed before bulk_delete_models.", { workspaceId: z.string().describe("Anaplan workspace ID or name"), modelId: z.string().describe("Anaplan model ID or name"), - src/tools/bulk.ts:296-304 (registration)Registration of 'close_model' tool on the MCP server via server.tool() call, within registerBulkTools() function.
server.tool("close_model", "Close (archive) a model. Requires workspace admin. Must be closed before bulk_delete_models.", { workspaceId: z.string().describe("Anaplan workspace ID or name"), modelId: z.string().describe("Anaplan model ID or name"), }, async ({ workspaceId, modelId }) => { const wId = await resolver.resolveWorkspace(workspaceId); const mId = await resolver.resolveModel(wId, modelId); await apis.modelManagement.close(wId, mId); return { content: [{ type: "text" as const, text: `Model ${mId} closed successfully.` }] }; }); - src/api/modelManagement.ts:12-14 (helper)The close() method in ModelManagementApi class that makes the HTTP POST request to /workspaces/{wId}/models/{mId}/close endpoint.
async close(workspaceId: string, modelId: string) { return this.client.post<any>(`/workspaces/${workspaceId}/models/${modelId}/close`); }