Skip to main content
Glama
block

Square MCP Server

by block

inventory

Manage inventory operations in Square by tracking stock levels, adjusting quantities, and retrieving inventory data for accurate business management.

Instructions

Manage inventory operations

Args:
    operation: The operation to perform. Valid operations:
        - batch_change_inventory
        - batch_retrieve_inventory_changes
        - batch_retrieve_inventory_counts
        - retrieve_inventory_adjustment
        - retrieve_inventory_changes
        - retrieve_inventory_count
        - retrieve_inventory_physical_count
        - retrieve_inventory_transfer
    params: Dictionary of parameters for the specific operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
paramsYes

Implementation Reference

  • The handler function for the 'inventory' tool. It is registered via @mcp.tool() decorator and handles multiple inventory operations by dispatching to the corresponding Square API methods based on the 'operation' parameter provided.
    @mcp.tool()
    async def inventory(
        operation: str,
        params: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Manage inventory operations
    
        Args:
            operation: The operation to perform. Valid operations:
                - batch_change_inventory
                - batch_retrieve_inventory_changes
                - batch_retrieve_inventory_counts
                - retrieve_inventory_adjustment
                - retrieve_inventory_changes
                - retrieve_inventory_count
                - retrieve_inventory_physical_count
                - retrieve_inventory_transfer
            params: Dictionary of parameters for the specific operation
        """
        try:
            match operation:
                case "batch_change_inventory":
                    result = square_client.inventory.batch_change_inventory(params)
                case "batch_retrieve_inventory_changes":
                    result = square_client.inventory.batch_retrieve_inventory_changes(params)
                case "batch_retrieve_inventory_counts":
                    result = square_client.inventory.batch_retrieve_inventory_counts(params)
                case "retrieve_inventory_adjustment":
                    result = square_client.inventory.retrieve_inventory_adjustment(**params)
                case "retrieve_inventory_changes":
                    result = square_client.inventory.retrieve_inventory_changes(**params)
                case "retrieve_inventory_count":
                    result = square_client.inventory.retrieve_inventory_count(**params)
                case "retrieve_inventory_physical_count":
                    result = square_client.inventory.retrieve_inventory_physical_count(**params)
                case "retrieve_inventory_transfer":
                    result = square_client.inventory.retrieve_inventory_transfer(**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)))
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. The description mentions 'manage inventory operations' which implies both read and write capabilities, but doesn't specify which operations are destructive versus safe, what permissions are needed, rate limits, or what happens on success/failure. The Args section lists operation types but doesn't explain their behavioral differences or consequences.

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 concise with a brief opening statement followed by structured Args section. However, the opening 'Manage inventory operations' adds little value, and the structure could be improved by front-loading more useful information about what the tool actually accomplishes rather than starting with a tautology.

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, 0% schema coverage, no annotations, no output schema, and nested objects in parameters, the description is inadequate. While it documents operation types, it doesn't explain what each operation does, what the params dictionary should contain for each, what the tool returns, or how errors are handled. The description leaves too many open questions for effective tool use.

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?

With 0% schema description coverage and 2 parameters, the description provides significant value by documenting the 'operation' parameter with 8 specific valid values. However, the 'params' parameter is described only as 'Dictionary of parameters for the specific operation' without detailing what those parameters might be for each operation type. This leaves substantial gaps in parameter understanding despite the operation enum documentation.

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 inventory operations' which is a tautology that essentially restates the tool name 'inventory'. While it lists specific operations in the Args section, the core description doesn't clearly articulate what the tool actually does beyond the generic term 'manage'. It doesn't distinguish this inventory tool from potential sibling inventory tools (though none are listed in siblings).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any of the sibling tools (bookings, business, catalog, etc.) or explain what inventory operations are versus what those other tools handle. There's no context about when specific operations should be used or any prerequisites 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