Skip to main content
Glama

Run a saved crawl

writ_run_saved_crawl

Run a saved crawl using its stored settings. Set max_age to reuse recently collected data instead of re-crawling, and check _cache.hit to see which path was taken.

Instructions

Run a saved crawl with its stored settings. Pass max_age to get the data it already collected if that run is recent enough — the cheap path. Otherwise it re-crawls. The response carries _cache.hit and _cache.age_seconds so you can tell which happened.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoBlock until the crawl converges (default false — a crawl is slow).
crawlYesSaved crawl slug, name, or id (from writ_saved_crawls).
limitNoRows of collected data to include (default 50).
outputNoRESPONSE SHAPE — set this whenever the answer is for a program or an API you are building, not for you to read. {shape: 'envelope' (default: Writ's full answer, projected) | 'table' ({columns, rows, total}) | 'records' (bare list of records) | 'record' (the newest record alone — one entity, a usage meter, a dashboard), fields: ['used', 'percent_used as pct', 'items.0.price as first_price'] (ordered pick, renames, dotted paths; missing → null so keys are stable), exclude: ['depth'], include_meta: false (page metadata content_kind/depth/thumbnails are STRIPPED unless true), key: 'usage' (wrap)}. On writ_crawl_site with save_as it is SAVED as the API's default shape.
max_ageNoReuse the last completed crawl if it finished within this many seconds. 0 (default) always re-crawls.
preview_charsNoCut each inline page's text cells to this many characters (default 12000; 0 = full). Full page: writ_workflow_data(workflow_id=<data_workflow_id>, refs=[...]).
timeout_secondsNoMax seconds to wait when wait=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare non-readOnly, non-idempotent, open-world, and the description adds genuinely new behavioral context on top: the cache-vs-recrawl decision, the cheap path, and the `_cache.hit` / `_cache.age_seconds` response fields. It still doesn't note that a run may be slow or that repeated calls without max_age duplicate work, but the added caching semantics are substantive.

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?

Three sentences, zero filler, front-loaded with purpose followed by the caching decision and the means to verify it. Every sentence earns its place.

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

Completeness4/5

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

With no output schema, the description discloses the most decision-relevant return fields (`_cache.hit`/`age_seconds`) and the caching model, which is enough to call it correctly across 7 params with full schema coverage. It stops short of describing the general response envelope or the non-idempotent side effects of an actual re-crawl.

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 baseline is 3, and the description goes beyond the schema by framing max_age as the 'cheap path' shortcut and by documenting the `_cache` response fields that appear in no parameter description. The wait/timeout/output parameters are left entirely to the schema.

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 (run) and resource (a saved crawl) and immediately scopes it with 'with its stored settings', which distinguishes it from writ_crawl_site (new crawl) and writ_update_saved_crawl (mutation of the definition). An agent can pick it out from the sibling list 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 Guidelines3/5

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

It gives one useful conditional: pass max_age for the cheap cached path, otherwise it re-crawls. But it never says when to choose this tool over writ_crawl_site, writ_scrape, or writ_saved_crawl_data, nor does it state prerequisites for the saved crawl existing. Usage is implied rather than routed.

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