Skip to main content
Glama
andrealufino

aapl-ads-mcp

list_orgs

Retrieve all Apple Search Ads organizations accessible with your credentials. Verify authentication and obtain org IDs, names, currencies, timezones, payment models, and user roles.

Instructions

List all Apple Search Ads organizations accessible with the configured credentials. Requires ASA authentication. Use this to verify credentials are valid and to discover available org IDs before calling other tools. Returns org ID, name, currency, timezone, payment model, and assigned role names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration and handler for the list_orgs tool. Calls the ASA API /acls endpoint to list all accessible organizations, mapping the response to orgId, orgName, currency, paymentModel, timeZone, and roleNames. No input parameters required (empty schema).
    /** Registers the list_orgs tool — lists all accessible ASA organizations. */
    export function registerOrgsTools(server: McpServer, client: AsaClient): void {
      server.tool(
        "list_orgs",
        "List all Apple Search Ads organizations accessible with the configured credentials. Requires ASA authentication. Use this to verify credentials are valid and to discover available org IDs before calling other tools. Returns org ID, name, currency, timezone, payment model, and assigned role names.",
        {},
        async () => {
          const response = await client.get<Organization[]>("/acls");
    
          const orgs = Array.isArray(response.data) ? response.data : [];
    
          const result = orgs.map((org) => ({
            orgId: org.orgId,
            orgName: org.orgName,
            currency: org.currency,
            paymentModel: org.paymentModel,
            timeZone: org.timeZone,
            roleNames: org.roleNames,
          }));
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result, null, 2),
              },
            ],
          };
        }
      );
  • Input schema for list_orgs — an empty object ({}) since no parameters are needed.
    {},
  • src/server.ts:23-24 (registration)
    Registration call: registerOrgsTools(server, client) is invoked during server creation to wire up the list_orgs tool.
    registerHealthTool(server);
    registerOrgsTools(server, client);
  • Organization TypeScript interface defining the shape of an organization object returned by the ASA API (orgId, orgName, currency, paymentModel, roleNames, timeZone).
    export interface Organization {
      orgId: number;
      orgName: string;
      currency: string;
      paymentModel: string;
      roleNames: string[];
      timeZone: string;
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It mentions authentication requirement ('Requires ASA authentication') and lists return fields, but does not disclose potential limitations (e.g., rate limits, error handling, pagination). Adequate but not exceptional.

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, each necessary and front-loaded: purpose, usage guidance, return data. No wasted words.

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 zero parameters, no output schema, and a simple list operation, the description covers all needed information: what it does, authentication, usage timing, and return fields. Completely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist (baseline 4). The description adds value by detailing what the return data includes (org ID, name, currency, timezone, payment model, assigned role names), which is beyond the empty schema.

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 verb 'List' and resource 'organizations' within the context of Apple Search Ads. It distinguishes itself from sibling tools like list_campaigns by specifying 'organizations' and includes the qualifier 'accessible with configured credentials'.

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 tells the agent when to use this tool: 'Use this to verify credentials are valid and to discover available org IDs before calling other tools.' This is excellent guidance for workflow sequencing.

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/andrealufino/aapl-ads-mcp'

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