Skip to main content
Glama

delete_meta_campaign

Permanently remove a Meta campaign and all associated ad sets and ads. This action cannot be undone, so use it to completely delete campaigns rather than temporarily pausing them.

Instructions

Permanently delete a Meta campaign and all its ad sets and ads. Cannot be undone. Use pause_meta_campaign to stop spending temporarily. Requires Starter plan or higher.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesMeta campaign ID to permanently delete.

Implementation Reference

  • Handler logic for 'delete_meta_campaign' tool. It checks the license, validates the campaign_id, calls the helper `metaDelete` to perform the API request, and returns the success status.
    case 'delete_meta_campaign': {
        const denied = licenseCheck('meta');
        if (denied) return fail(denied);
        if (!args.campaign_id) return fail('campaign_id required.');
        await metaDelete(`/${args.campaign_id}`);
        return ok({ success: true, campaign_id: args.campaign_id, message: 'Campaign permanently deleted.' });
    }
  • MCP tool definition for 'delete_meta_campaign' including description and input schema.
        name: 'delete_meta_campaign',
        description: 'Permanently delete a Meta campaign and all its ad sets and ads. Cannot be undone. Use pause_meta_campaign to stop spending temporarily. Requires Starter plan or higher.',
        inputSchema: {
            type: 'object',
            properties: { campaign_id: { type: 'string', description: 'Meta campaign ID to permanently delete.' } },
            required: ['campaign_id'],
        },
    },
  • Helper function to perform DELETE requests against the Meta API. Used by the 'delete_meta_campaign' handler.
    async function metaDelete(path: string): Promise<MetaApiResponse> {
        const url = new URL(`${META_API}${path}`);
        url.searchParams.set('access_token', cfg.metaToken());
        const response = await fetch(url.toString(), { method: 'DELETE' });
        const json = await response.json() as MetaApiResponse;
        if (json.error) throw new Error(`Meta API: ${json.error.message} (code ${json.error.code})`);
        return json;
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden and does so effectively: it discloses the irreversible nature ('Cannot be undone'), the destructive scope (deletes campaign, ad sets, and ads), and authorization requirements (Starter plan or higher). It lacks details on rate limits or error handling, but covers key behavioral traits.

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?

Three sentences with zero waste: the first states the action and scope, the second warns about irreversibility and provides an alternative, and the third specifies prerequisites. Each sentence adds critical information, making it front-loaded and efficient.

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?

For a destructive tool with no annotations and no output schema, the description is largely complete: it covers purpose, usage, behavioral risks, and prerequisites. It could mention response format or error cases, but given the simplicity (one parameter, no output schema), it provides sufficient context for safe use.

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 the schema already documents the single parameter (campaign_id). The description adds no additional parameter details beyond what the schema provides, such as format examples or constraints, meeting the baseline for high schema coverage.

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 specific action ('permanently delete') and resource ('Meta campaign and all its ad sets and ads'), distinguishing it from siblings like pause_meta_campaign. It goes beyond the tool name by specifying the scope of deletion.

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?

It explicitly provides when to use this tool (for permanent deletion) versus an alternative (pause_meta_campaign for temporary stopping), and includes prerequisites (requires Starter plan or higher), offering comprehensive guidance.

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/Nolas-Shadow/agent1st-ads-mcp'

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