delete_variable
Remove a variable from Google Tag Manager by specifying account, container, workspace, and variable IDs to clean up configurations.
Instructions
変数を削除します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | アカウントID | |
| containerId | Yes | コンテナID | |
| workspaceId | Yes | ワークスペースID | |
| variableId | Yes | 変数ID |
Implementation Reference
- src/index.js:1896-1913 (handler)MCP tool execution handler for 'delete_variable'. Extracts arguments and calls GTMClient.deleteVariable, returning the result as formatted JSON text content.case 'delete_variable': return { content: [ { type: 'text', text: JSON.stringify( await this.gtmClient.deleteVariable( args.accountId, args.containerId, args.workspaceId, args.variableId ), null, 2 ), }, ], };
- src/index.js:801-826 (schema)Tool schema definition including input schema for 'delete_variable' provided in the listTools response.{ name: 'delete_variable', description: '変数を削除します', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'アカウントID', }, containerId: { type: 'string', description: 'コンテナID', }, workspaceId: { type: 'string', description: 'ワークスペースID', }, variableId: { type: 'string', description: '変数ID', }, }, required: ['accountId', 'containerId', 'workspaceId', 'variableId'], }, },
- src/gtm-client.js:338-344 (helper)Core implementation in GTMClient that authenticates and calls the Google Tag Manager API to delete the specified variable.async deleteVariable(accountId, containerId, workspaceId, variableId) { await this.ensureAuth(); await this.tagmanager.accounts.containers.workspaces.variables.delete({ path: `accounts/${accountId}/containers/${containerId}/workspaces/${workspaceId}/variables/${variableId}` }); return { success: true }; }