Skip to main content
Glama
ms-methos

jsonfabrica-mcp-server

Get a JsonFabrica batch

jsonfabrica_get_batch
Read-onlyIdempotent

Retrieve the status and generated documents of an asynchronous JSON batch job using its batch ID.

Instructions

Calls GET /v1/batches/{batchId}. Returns batch status and, once complete, the generated documents. Use this to poll a batch that was accepted asynchronously (202).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
batchIdYesID of the batch job to fetch, as returned by jsonfabrica_create_batch. Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoPRNG seed used for the whole batch.
specNoThe original BatchSpec request body this batch was created from.
errorNoPresent if the whole batch failed.
statusYesCurrent batch status.
batchIdYesId of the fetched batch.
tenantIdNoOwning tenant id.
documentsNoGenerated documents, once available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / batchId / description
      Added value: +"ID of the batch job to fetch, as returned by jsonfabrica_create_batch. Required."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "batchId": {
      +      "description": "Id of the fetched batch.",
      +      "type": "string"
      +    },
      +    "documents": {
      +      "description": "Generated documents, once available.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "alias": {
      +            "description": "The `documents[]` alias this document was generated for.",
      +            "type": "string"
      +          },
      +          "batchId": {
      +            "description": "Id of the batch this document belongs to.",
      +            "type": "string"
      +          },
      +          "documentSeed": {
      +            "description": "Per-document PRNG seed actually used.",
      +            "type": "number"
      +          },
      +          "result": {
      +            "description": "The generated document; shape depends on the template body. Absent while pending/failed."
      +          },
      +          "seqNo": {
      +            "description": "0-based index of this document within its alias group.",
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "status": {
      +            "description": "Per-document generation status.",
      +            "enum": [
      +              "pending",
      +              "completed",
      +              "failed"
      +            ],
      +            "type": "string"
      +          },
      +          "templateId": {
      +            "description": "Template used to generate this document.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "batchId",
      +          "alias",
      +          "seqNo",
      +          "templateId",
      +          "status"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "description": "Present if the whole batch failed.",
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "seed": {
      +      "description": "PRNG seed used for the whole batch.",
      +      "type": "number"
      +    },
      +    "spec": {
      +      "description": "The original BatchSpec request body this batch was created from."
      +    },
      +    "status": {
      +      "description": "Current batch status.",
      +      "enum": [
      +        "queued",
      +        "running",
      +        "completed",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "tenantId": {
      +      "description": "Owning tenant id.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "batchId",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.4

TDQS

A5/5.0
Behavior5/5

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

Read-only, idempotent, and non-destructive behavior is fully disclosed via annotations, and the description accurately reflects that no side effects occur beyond retrieving batch state and documents.

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?

The description is concise and information-dense, using two sentences to convey endpoint, result, and usage context without unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a complete output schema and clear parameter documentation, the description provides all necessary context for correct invocation and interpretation of results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single required parameter batchId is fully described in the schema and the description adds useful provenance by noting it comes from jsonfabrica_create_batch.

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

Purpose5/5

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

Description states the exact HTTP method and resource (GET /v1/batches/{batchId}) and clarifies that it returns batch status and generated documents. It clearly distinguishes this from batch creation and other sibling operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to use this tool for polling a batch that was accepted asynchronously (202), making the intended invocation context unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.