Skip to main content
Glama
ekim197

Uber External Ads API MCP Server

by ekim197

get_campaign

Retrieve detailed information about a specific Uber advertising campaign using its unique identifier and ad account details.

Instructions

Get details for a specific campaign

Input Schema

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

Implementation Reference

  • The handler function that implements the logic for the 'get_campaign' tool. It validates inputs, makes an API call to retrieve the specific campaign details from Uber Ads API, and returns the response as formatted JSON.
    private async getCampaign(args: any) {
      const authToken = this.getAuthToken(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.get(url, {
          headers: {
            'Authorization': `Bearer ${authToken}`,
            'Accept': 'application/json',
          },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error) {
        return this.handleApiError(error);
      }
    }
  • Input schema definition for the 'get_campaign' tool, specifying required parameters: ad_account_id and campaign_id, with optional auth_token.
    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:142-164 (registration)
    Registration of the 'get_campaign' tool in the ListToolsRequestHandler response, including name, description, and input schema.
    {
      name: 'get_campaign',
      description: 'Get details for a specific 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,
      },
    },
  • src/index.ts:414-415 (registration)
    Dispatcher case in CallToolRequestHandler that routes 'get_campaign' calls to the getCampaign handler method.
    case 'get_campaign':
      return await this.getCampaign(args);
  • Zod validation schemas for ad_account_id and campaign_id inputs used in the getCampaign handler.
    const AdAccountIdSchema = z.string().min(1, 'Ad account ID is required');
    
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure but only states it retrieves details without specifying what 'details' includes, whether it's read-only, if it requires specific permissions, or how errors are handled. This leaves significant gaps for a tool that likely interacts with ad campaigns.

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, clear sentence with no wasted words, making it easy to parse and front-loaded with the core purpose. It efficiently communicates the essential action without unnecessary elaboration.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what details are returned, potential error conditions, or behavioral traits like idempotency or rate limits, which are crucial for an AI agent to use this tool effectively in a real-world context.

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 schema description coverage is 100%, so parameters are well-documented in the schema itself. The description adds no additional meaning beyond implying 'campaign_id' identifies the campaign, which is already clear from the schema. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Get details') and resource ('for a specific campaign'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_campaigns' (plural) which likely retrieves multiple campaigns versus this single-campaign tool.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that 'get_campaigns' might be for listing campaigns or that this tool requires specific IDs, nor does it address prerequisites like authentication or account context.

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