Skip to main content
Glama

Read a batch job's results

spicrawl_batch_results
Read-onlyIdempotent

Return a page of FINISHED items of a batch job (one record per item: seq, url, external_id, status, error, and content, or a result_url API path (GET /v1/batch/{id}/tasks/{seq}/content, same key) for large bodies). Unfinished items are not listed yet. Returns { results: [...], next_cursor? }; pass next_cursor back as cursor for the next page. Results expire after the job's retention window (410 Gone).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoPage size (default 500, max 5000).
cursorNo`next_cursor` from a previous page, verbatim.
job_idYesThe batch job id returned by spicrawl_batch_submit or spicrawl_batch_list.
statusNoOnly items that finished with this status.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesFinished items of the job, in seq order.
next_cursorNoPass back as `cursor` for the next page; absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "next_cursor": {
      +      "description": "Pass back as `cursor` for the next page; absent on the last page.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "results": {
      +      "description": "Finished items of the job, in seq order.",
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "attempts": {
      +            "description": "How many times the item was tried.",
      +            "type": "number"
      +          },
      +          "bytes": {
      +            "description": "Response size recorded for this item.",
      +            "type": "number"
      +          },
      +          "credits_micro": {
      +            "description": "Micro-credits charged for this item (0 unless succeeded).",
      +            "type": "number"
      +          },
      +          "duration_ms": {
      +            "description": "Time spent on the item's final attempt, in milliseconds.",
      +            "type": "number"
      +          },
      +          "error": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "code": {
      +                    "description": "Stable machine error code; switch on this, not on text.",
      +                    "type": "string"
      +                  },
      +                  "retryable": {
      +                    "description": "True when running the item again may succeed.",
      +                    "type": "boolean"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Why the item failed. Absent on success."
      +          },
      +          "external_id": {
      +            "description": "The external_id supplied for this item, if any.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "finished_at": {
      +            "description": "ISO-8601 time the item reached its terminal status.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "http_status": {
      +            "description": "The target site's HTTP status (absent when no response was received).",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "request_id": {
      +            "description": "Id of the underlying request, for request history.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "result": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": true,
      +                "properties": {
      +                  "bytes": {
      +                    "description": "Full size of the stored payload in bytes.",
      +                    "type": "number"
      +                  },
      +                  "content": {
      +                    "description": "The item's document as raw JSON text (JSON-decode once to get the markdown, text or html). A prefix when truncated.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "omitted": {
      +                    "description": "True when no content was included because the page's size budget was spent; use a smaller `limit`.",
      +                    "type": [
      +                      "boolean",
      +                      "null"
      +                    ]
      +                  },
      +                  "truncated": {
      +                    "description": "True when `content` is only a prefix.",
      +                    "type": [
      +                      "boolean",
      +                      "null"
      +                    ]
      +                  },
      +                  "unavailable": {
      +                    "description": "Why the payload could not be read at all.",
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The payload inline. Absent while the job is running or when the item has none."
      +          },
      +          "result_url": {
      +            "description": "API path to fetch this item's content on its own.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "seq": {
      +            "description": "0-based position in submission order; use it with spicrawl_batch_task_content.",
      +            "type": "number"
      +          },
      +          "status": {
      +            "description": "Terminal item status: succeeded, failed, cancelled or skipped.",
      +            "type": "string"
      +          },
      +          "url": {
      +            "description": "The target URL as submitted.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "seq"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover the read-only/idempotent safety profile; the description goes well beyond them by disclosing that unfinished items are not yet listed, the exact paging contract, the expiry-and-410 behavior, and the large-body result_url fallback. This is exactly the behavioral context annotations cannot express.

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 core purpose leads the sentence, followed by pagination and retention details in priority order. Dense but efficient, though the first sentence packs several concepts into a nested parenthetical that could be split for faster scanning.

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?

Output schema exists, yet the description additionally explains the page shape and cursor handoff, plus what happens on expiry and where large bodies live. For a paginated read tool with three inputs, nothing an agent needs in order to call it correctly is missing.

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?

Schema description coverage is 100%, and the description's parameter-level content (cursor round-trip, page size, status filtering via the job's items) is already stated in the schema. It restates the paging loop without adding new syntax or constraints, so the baseline 3 applies.

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?

States a specific verb (Return) and resource (a page of FINISHED items of a batch job), and the scope word 'FINISHED' immediately distinguishes it from job-level status siblings and from per-task content fetches. An agent can identify the tool's role without opening the schema.

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

Usage Guidelines4/5

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

It gives clear operational context: results only appear once items finish, pages are walked by passing next_cursor back as cursor, and results expire (410 Gone). It also points at the result_url path for large bodies rather than the sibling spicrawl_batch_task_content. What's missing is an explicit when-to-use comparison against spicrawl_batch_status or spicrawl_batch_list.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources