Skip to main content
Glama

cancel_log_export

Destructive

Cancel a pending or running log export job to stop it permanently. Takes effect immediately without rolling back already-processed rows.

Instructions

Cancel a pending or running log export job, unlike start_log_export which queues one or delete_integration which removes the source. This permanently stops that export, takes effect immediately, and does not roll back already-processed rows; call create_log_export and start_log_export again to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
export_idYesThe unique ID of the log export to cancel

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Implementation Reference

  • Canonical handler for cancel_log_export. Sends a POST request to /logs/exports/{exportId}/cancel via BaseService.post() to cancel a pending or running log export job.
    async cancelLogExport(exportId: string): Promise<LogExportActionResponse> {
    	return this.post<LogExportActionResponse>(
    		`/logs/exports/${this.encodePathSegment(exportId)}/cancel`,
    	);
    }
  • Registration of the 'cancel_log_export' tool on the MCP server. Calls service.logging.cancelLogExport(params.export_id) and returns a JSON result with message, export_id, and status.
    // Cancel log export tool
    server.tool(
    	"cancel_log_export",
    	"Cancel a pending or running log export job, unlike start_log_export which queues one or delete_integration which removes the source. This permanently stops that export, takes effect immediately, and does not roll back already-processed rows; call create_log_export and start_log_export again to retry.",
    	LOGGING_TOOL_SCHEMAS.cancelLogExport,
    	async (params) => {
    		const result = await service.logging.cancelLogExport(params.export_id);
    
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							message: result.message,
    							export_id: params.export_id,
    							status: "cancelled",
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Input schema definition for cancel_log_export. Defines a single required parameter 'export_id' (string) describing the unique ID of the log export to cancel.
    cancelLogExport: {
    	export_id: z.string().describe("The unique ID of the log export to cancel"),
    },
  • Response type LogExportActionResponse returned by cancelLogExport handler. Contains 'message' (string) and 'object' ("export") fields.
    export interface LogExportActionResponse {
    	message: string;
    	object: "export";
    }
Behavior5/5

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

Annotations already indicate destructiveHint:true and readOnlyHint:false. Description adds crucial details: permanently stops, takes effect immediately, and does not roll back processed rows. No contradiction with annotations.

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?

Two concise sentences front-loading the action. Every word adds value with no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with output schema, the description covers all necessary context: when to use, effects, and what to do next (retry). No gaps.

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?

Only one parameter (export_id) with a clear schema description. The tool description does not add additional meaning beyond the schema, but since schema coverage is 100%, a baseline of 3 is appropriate.

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 tool cancels a pending or running log export. It distinguishes this from start_log_export (queues) and delete_integration (removes source), establishing unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (cancel pending/running export) and not to use (unlike start_log_export or delete_integration). Also explains that it does not roll back rows and advises recreating and starting again to retry, providing clear context for decision-making.

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/s-b-e-n-s-o-n/portkey-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server