Skip to main content
Glama

create_budget_schedule

Create a scheduled budget for your ad account by setting amount, type, and time range. Define absolute or multiplier values with start and end times.

Instructions

Create a new ad budget schedule for the ad account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_valueYesBudget amount in account currency cents
budget_value_typeYesBudget value type (e.g. ABSOLUTE, MULTIPLIER)
time_startYesSchedule start time (ISO 8601 or Unix timestamp)
time_endYesSchedule end time (ISO 8601 or Unix timestamp)

Implementation Reference

  • The handler for the 'create_budget_schedule' tool. It receives budget_value, budget_value_type, time_start, and time_end, then POSTs to the Meta Ads API endpoint /act_{accountId}/adbudgetschedules.
    // ─── create_budget_schedule ───────────────────────────────────
    server.tool(
      "create_budget_schedule",
      "Create a new ad budget schedule for the ad account.",
      {
        budget_value: z.string().describe("Budget amount in account currency cents"),
        budget_value_type: z.string().describe("Budget value type (e.g. ABSOLUTE, MULTIPLIER)"),
        time_start: z.string().describe("Schedule start time (ISO 8601 or Unix timestamp)"),
        time_end: z.string().describe("Schedule end time (ISO 8601 or Unix timestamp)"),
      },
      async ({ budget_value, budget_value_type, time_start, time_end }) => {
        try {
          const params: Record<string, unknown> = {
            budget_value,
            budget_value_type,
            time_start,
            time_end,
          };
          const { data, rateLimit } = await client.post(`${client.accountPath}/adbudgetschedules`, params);
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...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 };
        }
      }
    );
  • Input schema for create_budget_schedule, defined as Zod object with four required fields: budget_value (string), budget_value_type (string), time_start (string), time_end (string).
    {
      budget_value: z.string().describe("Budget amount in account currency cents"),
      budget_value_type: z.string().describe("Budget value type (e.g. ABSOLUTE, MULTIPLIER)"),
      time_start: z.string().describe("Schedule start time (ISO 8601 or Unix timestamp)"),
      time_end: z.string().describe("Schedule end time (ISO 8601 or Unix timestamp)"),
    },
  • Registration of 'create_budget_schedule' via server.tool() in the registerBudgetTools function. The tool is exported and called from src/index.ts at line 82.
    server.tool(
      "create_budget_schedule",
      "Create a new ad budget schedule for the ad account.",
      {
        budget_value: z.string().describe("Budget amount in account currency cents"),
        budget_value_type: z.string().describe("Budget value type (e.g. ABSOLUTE, MULTIPLIER)"),
        time_start: z.string().describe("Schedule start time (ISO 8601 or Unix timestamp)"),
        time_end: z.string().describe("Schedule end time (ISO 8601 or Unix timestamp)"),
      },
      async ({ budget_value, budget_value_type, time_start, time_end }) => {
        try {
          const params: Record<string, unknown> = {
            budget_value,
            budget_value_type,
            time_start,
            time_end,
          };
          const { data, rateLimit } = await client.post(`${client.accountPath}/adbudgetschedules`, params);
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...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 };
        }
      }
    );
  • src/index.ts:82-82 (registration)
    Entry point where registerBudgetTools is called with the real server and client, which registers the create_budget_schedule tool.
    registerBudgetTools(server, client);
  • The AdsClient.post() helper method used by the handler to POST to /adbudgetschedules endpoint. Delegates to the private request() method.
    async post(
      path: string,
      params?: Record<string, unknown>
    ): Promise<ClientResponse> {
      return this.request("POST", path, params);
    }
    
    async delete(
      path: string,
      params?: Record<string, unknown>
    ): Promise<ClientResponse> {
      return this.request("DELETE", path, params);
    }
Behavior2/5

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

No annotations are present, and the description does not disclose behavioral traits such as whether it replaces existing schedules, requires specific permissions, or has rate limits. The tool is a mutation but lacks safety context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words. It is appropriately concise, though it could be expanded with key details without being verbose.

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 complexity (4 required params, no output schema, no annotations), the description is too sparse. It omits information about schedule constraints, timing semantics, and relationship to existing budgets.

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?

All 4 parameters have schema descriptions providing meaning. The description adds no additional context beyond the schema, which is adequate but not enhanced.

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 ('Create') and the resource ('ad budget schedule'), but does not differentiate from sibling tools like 'update_budget_schedule' or 'delete_budget_schedule'. It's sufficient for basic understanding.

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?

There is no guidance on when to use this tool versus alternatives such as 'update_budget_schedule' or 'list_budget_schedules'. No conditions or exclusions are provided.

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