Skip to main content
Glama

get_retl_failed_records

Read one page of a finished Reverse ETL (rETL) sync run's FAILED records: the rows the destination rejected, each with _rudder_id, primary_key, operation, error_code and error_message.

Get connection_id from list_connections and, optionally, run_id from get_retl_source_syncs (it defaults to the connection's latest run). Filter with error_code (one destination code, e.g. "400"; "null" means no code) or search (a substring of primary_key). Page with page (default 1) and page_size (default 30, max 100); only the first 5000 records of a run are reachable, so filter to reach the rest.

error_message is the destination's own reply text and CAN CONTAIN CUSTOMER DATA; treat the rows as sensitive. Runs a query on the customer's warehouse; it changes no data, but the warehouse bills the compute to the customer. A resume_id call only polls, unless its result expired.

Besides "ok", status can be: error_details_off (the connection does not record per-record errors — nothing to read), not_retained (the run is older than the connection's retention), not_captured (no failed-records table was written for this run), warehouse_config_changed (the warehouse settings changed after the run), or running (the query is still going — call again with the returned resume_id, plus the same workspace_id if this call had one, and no other arguments). If a run's failed-records table cannot be read, you may instead get an error whose text names both possible causes (the warehouse query failed, or the table has aged out) rather than one of those statuses.

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number. Default 1.
run_idNoA sync run id from get_retl_source_syncs. Defaults to the connection's latest run.
searchNoCase-insensitive substring match on primary_key only. At most 256 characters.
page_sizeNoRows per page, 1 to 100. Default 30.
resume_idNoFrom an earlier 'running' answer. When set, send only resume_id (plus the same workspace_id if this call had one) and no other arguments.
error_codeNoKeep only records with this destination error code, e.g. "400". The literal "null" keeps records with no code.
workspace_idYes
connection_idNoThe rETL connection, from list_connections. Required unless resume_id is set.
full_messagesNoDefault false: each error_message is cut to 500 characters (error_message_truncated is then true). True returns the stored text, up to 2 KB per row.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations it discloses the full behavioral surface: warehouse compute is billed to the customer, error_message may contain customer data, the 5000-record reachability cap, truncation at 500 chars unless full_messages is set, and every non-'ok' status (error_details_off, not_retained, not_captured, warehouse_config_changed, running) with recovery behavior. The 'changes no data but bills compute' note also explains why readOnlyHint is false without contradicting it.

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 what gets returned, then sourcing, then filtering/pagination, then risk and status semantics — a sensible order for a 9-parameter tool. Some resume_id instructions are restated from the schema, and the parenthetical status list makes it dense, but no sentence is filler.

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?

For a tool with nine parameters, no output schema, and a branching status model, the description supplies the return shape, the failure modes, the sensitivity and cost caveats, and the retry protocol. An agent has everything needed to call it and to interpret a non-'ok' response without guessing.

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 89%, so the schema already carries most parameter meaning; the description's added value is the 5000-record window constraint, which tells the agent that error_code/search are the escape hatch rather than paging alone. It does not add anything for workspace_id or full_messages beyond what the schema states.

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?

The opening sentence names a specific verb and resource ('Read one page of a finished Reverse ETL sync run's FAILED records'), scopes it to a single page and run, and enumerates the returned fields (_rudder_id, primary_key, operation, error_code, error_message). This clearly separates it from get_retl_source_syncs (which yields run ids) and get_destinations_errors.

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 explicitly routes the agent to list_connections for connection_id and get_retl_source_syncs for run_id, and explains the filter-versus-page tradeoff when a run exceeds 5000 records. It stops short of an explicit 'do not use this tool when…' exclusion against the error-listing siblings, but the surrounding context is strong.

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