Skip to main content
Glama

delete_audience

Remove a custom audience permanently. Delete outdated or unwanted audiences from your ad account with this irreversible action.

Instructions

Delete a custom audience. This action is irreversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audience_idYesAudience ID to delete

Implementation Reference

  • The delete_audience tool handler: registers the tool with server.tool(), defines schema with audience_id param, and executes a DELETE request to /{audience_id}.
    // ─── delete_audience ───────────────────────────────────────
    server.tool(
      "delete_audience",
      "Delete a custom audience. This action is irreversible.",
      {
        audience_id: z.string().describe("Audience ID to delete"),
      },
      async ({ audience_id }) => {
        try {
          const { data, rateLimit } = await client.delete(`/${audience_id}`);
          return { content: [{ type: "text" as const, text: JSON.stringify({ success: true, ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • The registerAudienceTools function that wraps all audience tool registrations including delete_audience.
    export function registerAudienceTools(server: McpServer, client: AdsClient): void {
  • src/index.ts:61-61 (registration)
    Where registerAudienceTools is called to register all audience tools (including delete_audience) on the MCP server.
    registerAudienceTools(server, client);
Behavior3/5

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

The description notes that the action is irreversible, which is a key behavioral trait. However, beyond that, it does not disclose any other side effects, permissions, or rate limits. Since no annotations are present, the description carries the full burden but provides only minimal extra context.

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?

The description is two short sentences with no filler. It front-loads the core action and then adds the critical irreversible note, achieving maximum conciseness.

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 simple deletion tool with one parameter and no output schema, the description is complete. It states what it does and highlights the irreversible nature, covering all essential information an agent needs.

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?

The input schema already describes the 'audience_id' parameter with full coverage (100%). The description adds no additional meaning or constraints beyond what the schema provides, resulting in a baseline score.

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 deletes a custom audience, and the verb 'Delete' combined with 'custom audience' directly conveys the action. It is distinct from sibling tools like 'create_custom_audience' or 'update_audience'.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance is provided. The usage is implied as 'when you want to delete an audience', but there is no mention of alternatives or conditions.

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/mikusnuz/meta-ads-mcp'

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