Skip to main content
Glama

create_batch_operation

Submit up to 500 Mailchimp API operations in a single batch request by specifying method, path, and body for each operation.

Instructions

Submit a batch of API operations. operations: JSON array of {method, path, body} objects. Max 500 ops.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function for the create_batch_operation tool. It accepts a JSON string of operations, parses it, sends up to 500 operations to the Mailchimp /batches endpoint, and returns the batch ID and status.
    @mcp.tool()
    async def create_batch_operation(operations: str) -> str:
        """Submit a batch of API operations. operations: JSON array of {method, path, body} objects. Max 500 ops."""
        mc = get_client()
        import json as _json
        try:
            ops = _json.loads(operations)
        except _json.JSONDecodeError:
            return "Invalid JSON. Provide an array of {method, path, body} objects."
        if not isinstance(ops, list):
            return "operations must be a JSON array."
        data = await mc.post("/batches", json={"operations": ops[:500]})
        return _fmt({
            "batch_id": data.get("id", ""),
            "status": data.get("status", ""),
            "total_operations": data.get("total_operations", 0),
            "submitted_at": data.get("submitted_at", ""),
            "message": "Batch submitted. Check status with the batch ID.",
        })
  • The @mcp.tool() decorator registers this function as an MCP tool named 'create_batch_operation' with the FastMCP server instance.
    @mcp.tool()
    async def create_batch_operation(operations: str) -> str:
Behavior2/5

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

No annotations are provided, so the description must carry behavioral disclosure. It mentions 'submit' (mutation) and a max ops limit, but lacks details on side effects, authentication needs, rate limits, or what happens upon submission.

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?

Two sentences: first defines purpose, second explains the parameter. Every word is useful, no redundancy.

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?

Given the presence of an output schema, the description covers the parameter format adequately. However, it does not explain the return value or behavior beyond submission (e.g., asynchronous processing, error handling).

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, the description adds essential meaning by specifying that operations is a 'JSON array of {method, path, body} objects', which is not evident from the schema alone.

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

Purpose4/5

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

The description clearly states 'Submit a batch of API operations', which is a specific verb+resource. However, it does not explicitly differentiate from sibling batch tools like batch_subscribe_members, so the purpose is clear but not fully distinguished.

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?

The description implies usage for batching multiple operations and includes a constraint (max 500 ops), but provides no explicit guidance on when to use this versus alternatives, such as using specific single-operation tools.

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/AlexlaGuardia/mcp-mailchimp'

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