Skip to main content
Glama
Mike25app

scaleforge-mcp-meta-ads

delete_campaign

Hard-delete a campaign along with its ad sets and ads from Meta Ads. Use this to permanently remove campaigns, but consider archiving instead to preserve historical data.

Instructions

WRITE: Hard-delete a campaign (and its ad sets / ads). Prefer update_campaign with status=ARCHIVED if you want to keep historical data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYes

Implementation Reference

  • The handler function for delete_campaign that calls metaDelete with the campaign ID
    handler: async (args) => metaDelete(`/${String(args.campaign_id)}`),
  • Input schema for delete_campaign requiring a campaign_id string
    inputSchema: {
      campaign_id: z.string(),
    },
  • Tool registration definition within the campaignTools array
    {
      name: "delete_campaign",
      description:
        "WRITE: Hard-delete a campaign (and its ad sets / ads). Prefer update_campaign with " +
        "status=ARCHIVED if you want to keep historical data.",
      inputSchema: {
        campaign_id: z.string(),
      },
      handler: async (args) => metaDelete(`/${String(args.campaign_id)}`),
    },
  • The metaDelete helper function that performs the actual DELETE request to Meta's Graph API
    export async function metaDelete<T = unknown>(path: string): Promise<T> {
      const qs = new URLSearchParams();
      qs.append("access_token", getCurrentToken());
      const url = `${META_API_BASE}${normalizePath(path)}?${qs.toString()}`;
    
      const res = await fetch(url, { method: "DELETE" });
      if (!res.ok) {
        const text = await res.text().catch(() => "");
        throw new Error(enhanceMetaError(res.status, text));
      }
      const raw = await res.text();
      if (!raw) return {} as T;
      try {
        return JSON.parse(raw) as T;
      } catch {
        return raw as unknown as T;
      }
Behavior4/5

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

Discloses hard-delete and cascade behavior. Without annotations, description carries the burden and covers key destructive aspects, though could mention irreversibility or permissions.

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 sentences, front-loaded with 'WRITE:' to signal mutation. No fluff, every word adds value.

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?

Given simplicity, description covers purpose, behavior, and usage guidance. Completeness is adequate without output schema.

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?

Single parameter campaign_id is implied but not described in detail. With 0% schema coverage, description should add format or constraints, but the purpose is clear.

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?

Clearly states it hard-deletes a campaign and cascades to ad sets/ads. Distinct from sibling update_campaign for soft 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?

Explicitly recommends using update_campaign with ARCHIVED status for preserving historical data, providing clear when-not-to-use 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/Mike25app/scaleforge-mcp-meta-ads'

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