Skip to main content
Glama
ekim197

Uber External Ads API MCP Server

by ekim197

delete_campaign

Remove an Uber advertising campaign by providing the ad account ID and campaign ID to permanently delete it from the Uber External Ads API.

Instructions

Delete a campaign

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYesThe ad account UUID
auth_tokenNoBearer token for authentication
campaign_idYesThe campaign UUID

Implementation Reference

  • The core handler function for the 'delete_campaign' tool. It validates input using Zod schemas, constructs the API endpoint URL, performs a DELETE request to the Uber Ads API to delete the specified campaign, returns a success message on completion, or propagates errors via handleApiError.
    private async deleteCampaign(args: any) {
      const authToken = AuthTokenSchema.parse(args.auth_token);
      const adAccountId = AdAccountIdSchema.parse(args.ad_account_id);
      const campaignId = CampaignIdSchema.parse(args.campaign_id);
    
      const url = `${UBER_ADS_API_BASE_URL}/${adAccountId}/campaigns/${campaignId}`;
    
      try {
        const response = await axios.delete(url, {
          headers: {
            'Authorization': `Bearer ${authToken}`,
            'Accept': 'application/json',
          },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: `Campaign ${campaignId} deleted successfully`,
            },
          ],
        };
      } catch (error) {
        return this.handleApiError(error);
      }
    }
  • src/index.ts:318-340 (registration)
    Registers the 'delete_campaign' tool in the list returned by ListToolsRequestHandler, specifying its name, description, and input schema for validation.
    {
      name: 'delete_campaign',
      description: 'Delete a campaign',
      inputSchema: {
        type: 'object',
        properties: {
          auth_token: {
            type: 'string',
            description: 'Bearer token for authentication',
          },
          ad_account_id: {
            type: 'string',
            description: 'The ad account UUID',
          },
          campaign_id: {
            type: 'string',
            description: 'The campaign UUID',
          },
        },
        required: ['ad_account_id', 'campaign_id'],
        additionalProperties: false,
      },
    },
  • Defines the input schema for the 'delete_campaign' tool, specifying properties (auth_token, ad_account_id, campaign_id) and required fields.
    inputSchema: {
      type: 'object',
      properties: {
        auth_token: {
          type: 'string',
          description: 'Bearer token for authentication',
        },
        ad_account_id: {
          type: 'string',
          description: 'The ad account UUID',
        },
        campaign_id: {
          type: 'string',
          description: 'The campaign UUID',
        },
      },
      required: ['ad_account_id', 'campaign_id'],
      additionalProperties: false,
    },
  • src/index.ts:422-423 (registration)
    In the CallToolRequestHandler switch statement, registers and routes calls to the 'delete_campaign' tool by invoking the deleteCampaign handler method.
    case 'delete_campaign':
      return await this.deleteCampaign(args);
  • Zod schema for validating campaign_id input parameter used in the deleteCampaign handler.
    const CampaignIdSchema = z.string().min(1, 'Campaign ID is required');
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Delete' implies a destructive, irreversible mutation, but the description doesn't disclose behavioral traits like permission requirements, side effects (e.g., what happens to associated ads), or confirmation steps. This is a significant gap for a destructive tool with zero annotation coverage.

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 a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, though its brevity contributes to gaps in other dimensions. Every word earns its place in stating the core action.

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

Completeness2/5

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

Given the tool's complexity (destructive mutation with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address critical aspects like what deletion entails, error handling, or return values, leaving the agent with insufficient context for safe and effective 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 all parameters (ad_account_id, auth_token, campaign_id) with descriptions. The description adds no meaning beyond what the schema provides, such as explaining relationships between parameters or usage context. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Delete a campaign' clearly states the action (delete) and resource (campaign), but it's vague about scope and doesn't differentiate from siblings like 'update_campaign' which might also modify campaigns. It's a basic statement of purpose without specificity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing campaign), exclusions, or comparisons to siblings like 'update_campaign' for modifications instead of deletion. The agent must infer usage from the name alone.

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/ekim197/HACKATHON_MCP'

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