Skip to main content
Glama
fairquery

fairquery-llm-data-guard

Official

Poll a background guard_text run (free read)

get_run_results
Read-onlyIdempotent

Poll a guard_text run by run ID to get its status and one page of result rows; continue with nextOffset until finished, without rescanning or re-billing.

Instructions

WHAT: Read-only follow-up to guard_text(waitForFinish=false): returns the run status and one page of its result rows. It scans nothing itself. WHEN TO USE: only after guard_text returned run.run_id (large batches, many documentUrls or PDFs); poll until run.finished is true and page with nextOffset. Rows already written are returned while the run is RUNNING. WHEN NOT TO USE: to scan or redact (guard_text; a synchronous guard_text call already returns its rows, so there is nothing to poll). To restore placeholders in the rows' output_text after the LLM step, restore_placeholders (free). Cannot read runs of other Actors. BEHAVIOR: GET requests to your Apify account only (actor, run, dataset); never starts, aborts or re-bills a run. Typically <1 s; poll every 10-30 s. To stop a run early, abort it in the Apify console (run.console_url); this server has no abort tool. COST: free; needs the APIFY_TOKEN that started the run. The run was billed once, per document and finding, when it ran. RETURNS: run.status is READY | RUNNING | SUCCEEDED | FAILED | ABORTED | TIMED-OUT; finished=true for the last four, after which total no longer changes (FAILED/TIMED-OUT runs still return the rows they wrote). Rows are exactly the ones guard_text returns, including placeholder_map with ORIGINAL values if requested. Errors: APIFY_TOKEN_MISSING, RUN_NOT_FOUND, RUN_NOT_FOR_THIS_ACTOR, APIFY_TOKEN_INVALID, APIFY_RUN_LOOKUP_FAILED / APIFY_DATASET_READ_FAILED (retryable). PARAMETERS: runId comes from guard_text run.run_id. Pages are in write order; total counts rows written so far, so keep calling with nextOffset until it is null and finished is true. EXAMPLE: {"runId":"a1B2c3D4e5F6g7H8i"} -> {"run":{"status":"SUCCEEDED","finished":true},"count":1,"total":1,"items":[{"type":"document","risk_level":"high",...}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional page size, integer 1-1000, default 100. Example: 250
runIdYesRequired. Apify run ID (letters and digits) from guard_text run.run_id. Example: "a1B2c3D4e5F6g7H8i"
offsetNoOptional integer >= 0, default 0; use nextOffset from the previous page. Example: 100

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
runYesrun_id, status, finished, dataset_id, started_at, finished_at, console_url
countYesRows in this page
itemsYesDataset rows: type=document or type=error
totalYesRows written by the run so far
nextOffsetYesOffset of the next page, or null

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/openWorld annotations: discloses that it only issues GETs and 'never starts, aborts or re-bills a run', latency (<1 s) and poll cadence (10-30 s), that there is no abort tool and aborts happen in the Apify console, cost/auth requirements, terminal status semantics, and named error codes including retryability. This is exactly the extra context annotations cannot carry.

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?

Front-loaded with labeled sections (WHAT/WHEN TO USE/WHEN NOT TO USE/BEHAVIOR/COST/RETURNS/PARAMETERS/EXAMPLE) that make it scannable, and every block earns its place. It is nonetheless long and verbose relative to a 3-parameter read tool, with some redundancy between WHAT, RETURNS and PARAMETERS.

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?

Despite an output schema existing, the description still supplies the status enumeration, the finished-semantics for terminal states, partial-results-while-RUNNING behavior, the full error set, and a worked example. Nothing an agent needs to poll correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: runId's provenance ('comes from guard_text run.run_id'), page ordering ('in write order'), and the pagination contract ('keep calling with nextOffset until it is null and finished is true'). It doesn't restate limit/offset types, which the schema already covers.

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 and resource ('Read-only follow-up to guard_text... returns the run status and one page of its result rows') and immediately scopes what it does not do ('It scans nothing itself'). An agent can distinguish it from guard_text, restore_placeholders and list_detectors without opening any schema.

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?

Explicit WHEN TO USE ('only after guard_text returned run.run_id... poll until run.finished is true') and WHEN NOT TO USE with named alternatives ('to scan or redact (guard_text...)... To restore placeholders... restore_placeholders'). It also states a hard boundary ('Cannot read runs of other Actors'), leaving nothing to inference.

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