Skip to main content
Glama

get_batch_status

Retrieve the status of a catalog batch operation by providing catalog ID and handle, to monitor completion or errors.

Instructions

Check the status of a catalog batch operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalog_idYesProduct catalog ID
handleYesBatch handle returned from batch_products

Implementation Reference

  • Registration of the 'get_batch_status' tool via server.tool(), binding the handler to MCP.
    server.tool(
      "get_batch_status",
      "Check the status of a catalog batch operation.",
      {
        catalog_id: z.string().describe("Product catalog ID"),
        handle: z.string().describe("Batch handle returned from batch_products"),
      },
      async ({ catalog_id, handle }) => {
        try {
          const { data, rateLimit } = await client.get(`/${catalog_id}/check_batch_request_status`, { handle });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Handler function that calls client.get('/{catalog_id}/check_batch_request_status') and returns the batch request status.
    async ({ catalog_id, handle }) => {
      try {
        const { data, rateLimit } = await client.get(`/${catalog_id}/check_batch_request_status`, { handle });
        return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
      } catch (error) {
        return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
      }
    }
  • Input schema with catalog_id (string) and handle (string) parameters defined using Zod.
    {
      catalog_id: z.string().describe("Product catalog ID"),
      handle: z.string().describe("Batch handle returned from batch_products"),
    },
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only says 'check the status' without clarifying if it is read-only, what permissions are needed, rate limits, or any side effects. This is insufficient for a task with no annotation support.

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

Conciseness4/5

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

The description is a single sentence, concise and front-loaded. However, it could be slightly more informative without losing conciseness.

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?

The tool has no output schema, so the description should at least indicate what the response contains (e.g., status fields, progress). It does not, leaving agents unsure of the return format. Complexity is low, but completeness is lacking.

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?

Both parameters (catalog_id, handle) are fully described in the input schema (100% coverage). The description adds no additional meaning beyond what the schema already provides, so baseline score of 3 is appropriate.

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 'Check the status of a catalog batch operation' clearly states the action (check) and resource (status of catalog batch operation). It distinguishes from sibling tools like batch_products which initiates the batch, and get_catalog which is about catalog details.

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 after calling batch_products to receive a handle, but does not explicitly state when to use or not use this tool. No alternatives or exclusions are mentioned.

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/mikusnuz/meta-ads-mcp'

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