Skip to main content
Glama
Mike25app

scaleforge-mcp-meta-ads

get_ad_account

Retrieve detailed configuration of a Meta Ads account, including status, spend cap, balance, funding source, business, timezone, and disable reason. Allows deep inspection of a single account via its ID.

Instructions

Get detailed info for a single Ad Account: status, spend cap, balance, funding source, business, timezone, disable_reason. Returns the full configuration record — use this for deep inspection of one account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_account_idYesAd Account ID — accepts 'act_123456' or just '123456'
fieldsNoComma-separated Meta API field list (overrides default field set)

Implementation Reference

  • The handler function that executes the 'get_ad_account' tool logic. It calls metaGet with the ad account ID path and optional/comma-separated fields (defaults to DEFAULT_ACCOUNT_FIELDS).
    handler: async (args) =>
      metaGet(`/${toAdAccountPath(String(args.ad_account_id))}`, {
        fields: args.fields ?? DEFAULT_ACCOUNT_FIELDS,
      }),
  • Input schema for the 'get_ad_account' tool, defining 'ad_account_id' (required string) and 'fields' (optional string) parameters using Zod.
    inputSchema: {
      ad_account_id: z
        .string()
        .describe("Ad Account ID — accepts 'act_123456' or just '123456'"),
      fields: z
        .string()
        .optional()
        .describe("Comma-separated Meta API field list (overrides default field set)"),
    },
  • Default Meta API field set used when no custom fields are provided: id, name, account_status, currency, business_name, business, spend_cap, amount_spent, balance, timezone_name, timezone_offset_hours_utc, disable_reason, funding_source_details.
    const DEFAULT_ACCOUNT_FIELDS =
      "id,name,account_status,currency,business_name,business,spend_cap,amount_spent,balance,timezone_name,timezone_offset_hours_utc,disable_reason,funding_source_details";
  • Utility function that normalizes ad account IDs by prepending 'act_' if not already present.
    function toAdAccountPath(idOrActId: string): string {
      return idOrActId.startsWith("act_") ? idOrActId : `act_${idOrActId}`;
  • src/index.ts:65-90 (registration)
    Registration loop where all tools (including 'get_ad_account' from accountTools) are registered with the MCP server via server.registerTool().
    for (const tool of allTools) {
      server.registerTool(
        tool.name,
        {
          description: tool.description,
          inputSchema: tool.inputSchema,
        },
        // The SDK's ToolCallback type infers the arg shape from inputSchema, but
        // our shared ToolDef uses a generic Record<string, unknown> signature for
        // portability. The cast here is intentional and isolated to the bridge.
        async (args: unknown) => {
          try {
            const result = await tool.handler(args as Record<string, unknown>);
            return {
              content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
            };
          } catch (err) {
            const message = err instanceof Error ? err.message : String(err);
            return {
              content: [{ type: "text" as const, text: `Error: ${message}` }],
              isError: true,
            };
          }
        },
      );
    }
Behavior3/5

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

No annotations exist, so the description carries the burden. It implies a read-only operation but doesn't explicitly state safety or side effects, which is acceptable for a get tool.

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 efficiently convey purpose, fields, and usage hint without any waste.

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

Completeness4/5

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

The description lists return fields, compensating for the missing output schema, and is adequate for a simple retrieval tool, though it omits error conditions.

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 description adds no additional parameter details beyond what is already in the 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 'Get detailed info for a single Ad Account' and lists specific fields, distinguishing it from siblings like list_ad_accounts.

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

Usage Guidelines4/5

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

It advises 'use this for deep inspection of one account', providing clear context but not explicitly excluding alternatives or detailing when not to use.

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