Skip to main content
Glama

set_availability_rules

DestructiveIdempotent

Configure or replace calendar availability rules, including buffer times before/after events and per-day working hours, so every availability query applies them automatically.

Instructions

Set or replace the availability rules on a calendar — buffer times before/after events and optional per-day working hours. When these rules are set, every availability query on this calendar automatically applies them (busy-block expansion for buffers, masking outside working hours). Upsert: overwrites any existing rules.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "calendar_id": "<calendar_id>"
    },
    "name": "set_availability_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
timezoneNoIANA timezone used to interpret working_hours (e.g. America/New_York)UTC
calendar_idYesCalendar to configure
working_hoursNoPer-day working hours map in the calendar's timezone; omit keys for off-days. Pass null to remove any working-hours constraint.
buffer_after_minutesNoMinutes of buffer after each event (0–120)
buffer_before_minutesNoMinutes of buffer before each event (0–120)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.8.4
    • addedInput schema / properties / calendar_id / maxLength
      Added value: +128
    • addedInput schema / properties / calendar_id / minLength
      Added value: +1
    • addedInput schema / properties / calendar_id / pattern
      Added value: +"^[A-Za-z0-9_-]*$"
  2. Changed1 schema field changedv1.8.1
    • changedInput schema / properties / working_hours / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "fri": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "mon": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "sat": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "sun": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "thu": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "tue": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "wed": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "fri": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "mon": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "sat": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "sun": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "thu": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "tue": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "wed": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the timezone of the availability rules or booking page it belongs to (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changedv1.2.6
    • changedInput schema / properties / working_hours / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "fri": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "mon": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "sat": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "sun": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "thu": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "tue": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      },
      -      "wed": {
      -        "description": "A single day's working hours window",
      -        "properties": {
      -          "end": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          },
      -          "start": {
      -            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "start",
      -          "end"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "fri": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "mon": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "sat": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "sun": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "thu": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "tue": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      },
      +      "wed": {
      +        "description": "A single day's working hours window",
      +        "properties": {
      +          "end": {
      +            "description": "End of the working window, HH:MM 24-hour, after start (e.g. \"17:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          },
      +          "start": {
      +            "description": "Start of the working window, HH:MM 24-hour, in the rules timezone (e.g. \"09:00\")",
      +            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "start",
      +          "end"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. First observedv1.2.5

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the overwrite risk is partially flagged. The description earns extra credit by explaining the downstream effect (buffers expand busy blocks, masking outside working hours) and that it overwrites existing rules, which annotations cannot convey.

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 compact sentences: what it does, why it matters, and the upsert caveat. The overwrite warning is placed last where it is most salient, and there is no redundant restatement of the schema.

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 5-parameter mutation tool with rich schema docs and no output schema, the description covers purpose, downstream effects, and overwrite semantics. It stops short of documenting partial-update behavior (e.g., whether omitted buffer fields reset to defaults), which is the remaining ambiguity an agent might face.

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%, including timezone semantics and the null-to-remove behavior for working_hours, so the schema already carries the parameter detail. The description adds only a high-level mention of buffers and working hours without new format or constraint information, making the baseline 3 appropriate.

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?

States a specific verb (set or replace) and resource (availability rules on a calendar), and names the concrete sub-entities (buffer times, per-day working hours). An agent can distinguish this from clear_availability_rules and get_availability_rules by the verbs alone.

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

Usage Guidelines3/5

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

Implies usage (configure rules so availability queries apply them) and notes upsert semantics, but never explicitly states when to prefer this over clear_availability_rules or get_availability_rules, nor any prerequisites such as ownership or permissions.

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