Skip to main content
Glama
block

Square MCP Server

by block

catalog

Manage Square catalog items, modifiers, taxes, and images through operations like create, update, search, and batch processing.

Instructions

Manage catalog operations

Args:
    operation: The operation to perform. Valid operations:
        - create_catalog_object
        - batch_delete_catalog_objects
        - batch_retrieve_catalog_objects
        - batch_upsert_catalog_objects
        - create_catalog_image
        - delete_catalog_object
        - retrieve_catalog_object
        - search_catalog_objects
        - update_catalog_object
        - update_item_modifier_lists
        - update_item_taxes
    params: Dictionary of parameters for the specific operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
paramsYes

Implementation Reference

  • The primary handler for the 'catalog' tool. Decorated with @mcp.tool() to register it with the MCP server. Dispatches to various Square Catalog API endpoints based on the 'operation' parameter.
    @mcp.tool()
    async def catalog(
        operation: str,
        params: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Manage catalog operations
    
        Args:
            operation: The operation to perform. Valid operations:
                - create_catalog_object
                - batch_delete_catalog_objects
                - batch_retrieve_catalog_objects
                - batch_upsert_catalog_objects
                - create_catalog_image
                - delete_catalog_object
                - retrieve_catalog_object
                - search_catalog_objects
                - update_catalog_object
                - update_item_modifier_lists
                - update_item_taxes
            params: Dictionary of parameters for the specific operation
        """
        try:
            match operation:
                case "create_catalog_object":
                    result = square_client.catalog.create_catalog_object(params)
                case "batch_delete_catalog_objects":
                    result = square_client.catalog.batch_delete_catalog_objects(params)
                case "batch_retrieve_catalog_objects":
                    result = square_client.catalog.batch_retrieve_catalog_objects(params)
                case "batch_upsert_catalog_objects":
                    result = square_client.catalog.batch_upsert_catalog_objects(params)
                case "create_catalog_image":
                    result = square_client.catalog.create_catalog_image(params)
                case "delete_catalog_object":
                    result = square_client.catalog.delete_catalog_object(**params)
                case "retrieve_catalog_object":
                    result = square_client.catalog.retrieve_catalog_object(**params)
                case "search_catalog_objects":
                    result = square_client.catalog.search_catalog_objects(params)
                case "update_catalog_object":
                    result = square_client.catalog.update_catalog_object(**params)
                case "update_item_modifier_lists":
                    result = square_client.catalog.update_item_modifier_lists(params)
                case "update_item_taxes":
                    result = square_client.catalog.update_item_taxes(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 catalog function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It lists operation names but doesn't disclose whether operations are read-only or destructive, what permissions are needed, rate limits, or what happens during execution (e.g., side effects). The description is too vague to inform safe or effective use.

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 structured with a brief header and a bulleted list, which is clear but not optimally front-loaded. The first sentence 'Manage catalog operations' is vague and doesn't immediately convey utility. However, it avoids unnecessary verbosity and the bullet list is efficient for listing operations.

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 (2 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It lists operations but doesn't explain what they do, their inputs/outputs, or behavioral traits. For a tool with multiple operations and no structured guidance, this leaves critical gaps for an AI agent to use it correctly.

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 adds significant value beyond the schema, which has 0% coverage. It enumerates 11 valid operations for the 'operation' parameter and explains that 'params' is a dictionary for operation-specific parameters. This compensates well for the schema's lack of descriptions, though it doesn't detail what each operation does or the structure of 'params'.

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 catalog operations' which is tautological with the tool name 'catalog' and lacks a specific verb-resource combination. While it lists operation types, it doesn't clearly articulate what the tool fundamentally does or distinguish it from sibling tools like 'inventory' or 'orders'.

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 on when to use this tool versus alternatives. The list of operations implies it's for catalog-related tasks, but there's no explicit context about prerequisites, when to choose specific operations, or how it differs from sibling tools like 'inventory' or 'products' (if present).

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