Skip to main content
Glama
block

Square MCP Server

by block

bookings

Manage Square booking operations including creating, searching, updating, and canceling appointments, plus handling team member schedules and location profiles.

Instructions

Manage booking operations

Args:
    operation: The operation to perform. Valid operations:
        Bookings:
            - create_booking
            - search_bookings
            - retrieve_booking
            - update_booking
            - cancel_booking
        Team Member Bookings:
            - bulk_retrieve_team_member_bookings
            - retrieve_team_member_booking_profile
        Location Profiles:
            - list_location_booking_profiles
            - retrieve_location_booking_profile
        Custom Attributes:
            - create_booking_custom_attribute_definition
            - update_booking_custom_attribute_definition
    params: Dictionary of parameters for the specific operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
paramsYes

Implementation Reference

  • The primary handler for the 'bookings' MCP tool. Registered via @mcp.tool() decorator. Accepts an 'operation' string and 'params' dict, dispatching to various Square Bookings API methods using a match statement. Includes input schema documentation in the docstring listing supported operations.
    async def bookings(
        operation: str,
        params: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Manage booking operations
    
        Args:
            operation: The operation to perform. Valid operations:
                Bookings:
                    - create_booking
                    - search_bookings
                    - retrieve_booking
                    - update_booking
                    - cancel_booking
                Team Member Bookings:
                    - bulk_retrieve_team_member_bookings
                    - retrieve_team_member_booking_profile
                Location Profiles:
                    - list_location_booking_profiles
                    - retrieve_location_booking_profile
                Custom Attributes:
                    - create_booking_custom_attribute_definition
                    - update_booking_custom_attribute_definition
            params: Dictionary of parameters for the specific operation
        """
        try:
            match operation:
                # Bookings
                case "create_booking":
                    result = square_client.bookings.create_booking(params)
                case "search_bookings":
                    result = square_client.bookings.search_bookings(params)
                case "retrieve_booking":
                    result = square_client.bookings.retrieve_booking(**params)
                case "update_booking":
                    result = square_client.bookings.update_booking(**params)
                case "cancel_booking":
                    result = square_client.bookings.cancel_booking(**params)
                # Team Member Bookings
                case "bulk_retrieve_team_member_bookings":
                    result = square_client.bookings.bulk_retrieve_team_member_bookings(params)
                case "retrieve_team_member_booking_profile":
                    result = square_client.bookings.retrieve_team_member_booking_profile(**params)
                # Location Profiles
                case "list_location_booking_profiles":
                    result = square_client.bookings.list_location_booking_profiles(**params)
                case "retrieve_location_booking_profile":
                    result = square_client.bookings.retrieve_location_booking_profile(**params)
                # Custom Attributes
                case "create_booking_custom_attribute_definition":
                    result = square_client.booking_custom_attributes.create_booking_custom_attribute_definition(params)
                case "update_booking_custom_attribute_definition":
                    result = square_client.booking_custom_attributes.update_booking_custom_attribute_definition(**params)
                case _:
                    raise McpError(INVALID_PARAMS, ErrorData(message=f"Invalid operation: {operation}"))
    
            return result.body
        except Exception as e:
            raise McpError(INTERNAL_ERROR, ErrorData(message=str(e)))
  • The @mcp.tool() decorator registers the 'bookings' function as an MCP tool with the name 'bookings'.
    async def bookings(
  • Docstring defining the input schema for the 'bookings' tool, including the list of supported operations and parameter descriptions.
    """Manage booking operations
    
    Args:
        operation: The operation to perform. Valid operations:
            Bookings:
                - create_booking
                - search_bookings
                - retrieve_booking
                - update_booking
                - cancel_booking
            Team Member Bookings:
                - bulk_retrieve_team_member_bookings
                - retrieve_team_member_booking_profile
            Location Profiles:
                - list_location_booking_profiles
                - retrieve_location_booking_profile
            Custom Attributes:
                - create_booking_custom_attribute_definition
                - update_booking_custom_attribute_definition
        params: Dictionary of parameters for the specific operation
    """
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'manage booking operations' which implies both read and write capabilities, but doesn't specify authentication requirements, rate limits, error conditions, or what happens during operations like 'cancel_booking'. For a tool with multiple operation types including destructive actions, this is insufficient behavioral context.

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

Conciseness3/5

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

The description is reasonably structured with clear categorization of operations, but could be more front-loaded. The initial 'Manage booking operations' line adds little value, and the formatting with bullet points is helpful but not optimally concise. Each operation listed earns its place by providing specific options, but the overall structure could better highlight the tool's core functionality first.

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?

For a tool with 2 parameters (one being a complex object), 0% schema description coverage, no annotations, and no output schema, the description is incomplete. While it documents the operation parameter well, it provides no information about the params dictionary structure, return values, error handling, or how this tool relates to sibling business tools. The absence of output schema means the description should ideally explain what the tool returns.

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?

The description provides significant value beyond the input schema, which has 0% description coverage. It enumerates 12 specific operation types organized into 4 categories, giving concrete meaning to the 'operation' parameter. While it doesn't detail the structure of the 'params' dictionary for each operation, the operation categorization adds substantial semantic context that the bare schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Manage booking operations' which is a tautology that restates the tool name 'bookings'. While it lists specific operation types, it doesn't clearly articulate what the tool actually does - whether it creates, modifies, retrieves, or deletes booking data. The purpose remains vague rather than specifying a clear verb+resource combination.

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 is provided about when to use this tool versus the sibling tools like 'orders', 'customers', or 'payments'. The description doesn't indicate what booking operations are distinct from other business operations, nor does it provide any context about prerequisites, appropriate scenarios, or limitations for using this tool.

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/block/square-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server