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);
    }
Behavior3/5

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

Description reveals partial update semantics ('Only provided fields will be modified'), which is a key behavioral trait beyond the schema. However, with no annotations, it lacks disclosure of authorization needs, error handling, or potential side effects.

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?

Single sentence with no superfluous information. Efficiently communicates core action and key behavioral note.

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

Completeness3/5

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

Adequate for a straightforward update operation with 4 parameters and no output schema. Lacks details on validation, required permissions, or response structure, which could be important for an agent.

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 covers all 4 parameters with descriptions. The description adds value by clarifying that only provided fields are modified, reinforcing optionality and partial update behavior beyond 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?

Description clearly states the action 'Update' and the resource 'budget schedule', distinguishing it from sibling tools like create_budget_schedule and list_budget_schedules.

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?

No guidance on when to use this tool versus alternatives, such as create_budget_schedule for new entries or delete_budget_schedule for removal. Missing context on prerequisites or restrictions.

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