Skip to main content
Glama

update_budget_schedule

Modify specific fields of an existing budget schedule, such as budget amount, start time, or end time, without affecting other settings.

Instructions

Update an existing budget schedule. Only provided fields will be modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schedule_idYesBudget schedule ID to update
budget_valueNoNew budget amount in account currency cents
time_startNoNew schedule start time
time_endNoNew schedule end time

Implementation Reference

  • The update_budget_schedule tool handler: takes schedule_id (required), and optional budget_value, time_start, time_end fields. Sends a POST request to /{schedule_id} with only the provided fields to update. Returns the API response or an error.
    // ─── update_budget_schedule ───────────────────────────────────
    server.tool(
      "update_budget_schedule",
      "Update an existing budget schedule. Only provided fields will be modified.",
      {
        schedule_id: z.string().describe("Budget schedule ID to update"),
        budget_value: z.string().optional().describe("New budget amount in account currency cents"),
        time_start: z.string().optional().describe("New schedule start time"),
        time_end: z.string().optional().describe("New schedule end time"),
      },
      async ({ schedule_id, budget_value, time_start, time_end }) => {
        try {
          const params: Record<string, unknown> = {};
          if (budget_value) params.budget_value = budget_value;
          if (time_start) params.time_start = time_start;
          if (time_end) params.time_end = time_end;
          const { data, rateLimit } = await client.post(`/${schedule_id}`, 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 };
        }
      }
    );
  • Zod schema for update_budget_schedule input: schedule_id (required string), budget_value (optional string), time_start (optional string), time_end (optional string).
    {
      schedule_id: z.string().describe("Budget schedule ID to update"),
      budget_value: z.string().optional().describe("New budget amount in account currency cents"),
      time_start: z.string().optional().describe("New schedule start time"),
      time_end: z.string().optional().describe("New schedule end time"),
    },
  • The registerBudgetTools function registers all budget tools including update_budget_schedule via server.tool().
    export function registerBudgetTools(server: McpServer, client: AdsClient): void {
  • src/index.ts:82-82 (registration)
    Where registerBudgetTools is called in the main server setup to register all budget tools (including update_budget_schedule).
    registerBudgetTools(server, client);
  • The AdsClient.post() helper method used by the update_budget_schedule handler to send the POST request to the Meta Ads API.
    async post(
      path: string,
      params?: Record<string, unknown>
    ): Promise<ClientResponse> {
      return this.request("POST", path, params);
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses a key behavioral trait: 'Only provided fields will be modified', indicating partial-update semantics. Since no annotations are provided, this is essential context. However, it does not mention validation, authorization, or what happens if the schedule_id is invalid.

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 two short sentences, front-loaded with the primary purpose, and contains no filler. Every word contributes to understanding the tool's function and behavior.

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?

For a relatively simple update operation, the description covers the essential purpose and partial-update behavior. No output schema exists, but that is not a major gap for an update tool. It could mention the response format or error conditions, but the current description is adequate for selecting and invoking the tool.

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?

Schema description coverage is 100%, so each parameter is already described. The description adds value by clarifying the update behavior for optional fields ('Only provided fields will be modified'), which is not explicitly stated in the schema. This helps the agent understand that omitting fields is intentional.

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 action ('Update an existing budget schedule') with a specific verb and resource. It distinguishes from sibling tools like create_budget_schedule and delete_budget_schedule by implying modification of an existing entity.

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?

The phrase 'existing' implies this is for modifying schedules that already exist, not for creating new ones. The sibling tool names (create_budget_schedule, delete_budget_schedule) provide context, but the description does not explicitly name alternatives or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools