Skip to main content
Glama

Turn a website into an API

writ_website_to_api
Destructive

TURNS A WEBSITE INTO A CALLABLE API (named functions with inputs, returning JSON), built by the caller in a real browser. url = the page that already shows the rows (search results or a listing, not the home page); goal = the inputs and fields wanted. The call first proposes the user's matching saved workflows and marketplace APIs (skip_existing / skip_marketplace build fresh), then opens a cloud browser bound to the build: capture_network records the site's own calls, writ_browser_network reads them, api_call probes them; a failed probe is evidence, not the end. Functions: HTTP flows first (writ_browser_compose define_function flow; writ_help('http_flows')), single requests (from_index) mixed in, DOM extraction last. writ_browser_save, then run_example on two inputs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "writ_website_to_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
goalNo
deviceNo
save_asNo
build_idNo
anonymousNo
persona_idNo
skip_existingNoSkip the proposal of the user's own matching workflows.
idempotency_keyNo
use_residentialNo
execution_targetNo
skip_marketplaceNoSkip the marketplace proposals.
residential_countryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • addedInput schema / properties / anonymous
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / device
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / execution_target
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / mode
      Removed value: -{
      -  "description": "intelligent (default, Writ builds it) | guided (the caller drives) | auto | fast | crawl | browser.",
      -  "enum": [
      -    "intelligent",
      -    "guided",
      -    "auto",
      -    "fast",
      -    "crawl",
      -    "browser",
      -    "regular",
      -    "deep"
      -  ],
      -  "type": "string"
      -}
    • addedInput schema / properties / residential_country
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / use_residential
      Added value: +{
      +  "type": "boolean"
      +}
  3. Changed18 schema fields changed
    • removedInput schema / properties / ai_supervise
      Removed value: -{
      -  "description": "AI-supervised crawl rungs (mode=crawl/browser; default true): after the crawl mines forms, POSTs, query links, scripts and listings, one bounded Writ AI call authors the API from them — which functions serve the goal, their names, inputs and example values; the live verify call then measures each response shape. false = the purely mechanical surface map (no AI spend on the crawl rungs).",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / anonymous
      Removed value: -{
      -  "description": "Builds from what is visible without an account even though the site shows a sign-in page; for when the user said the public part is enough.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / build_id / description
      Removed value: -"Continues a parked build (status needs_guidance from writ_discovery_status) on the guided rung: opens the browser bound to it, seeded with its map."
    • removedInput schema / properties / device
      Removed value: -{
      -  "description": "A linked Writ desktop's agent_id (writ_devices) to act on. Omitted: the desktop this connection chose with writ_devices action='use', if any.",
      -  "type": "string"
      -}
    • removedInput schema / properties / execution_target
      Removed value: -{
      -  "description": "'cloud' (the fleet) or a linked desktop's agent_id: builds there, in its own browser and connection. Omitted = the desktop chosen with writ_devices, else the cloud.",
      -  "type": "string"
      -}
    • removedInput schema / properties / goal / description
      Removed value: -"What the API should return or do, in plain language. Matched to the user's own workflows and marketplace listings first; narrows the crawl to what was asked (equivalent to `scope`) instead of mapping the whole app."
    • removedInput schema / properties / level
      Removed value: -{
      -  "description": "Write policy for the crawl rungs. 'light' (default) captures every endpoint and payload but never performs a real create/update/delete. 'deep' performs each write once to capture its real confirmation response, so it changes real data; opt-in, for an explicit request.",
      -  "enum": [
      -    "light",
      -    "deep"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / mode / description
      Previous value: -"intelligent (default): the full ladder driven by Writ — the AI fast path (a live browser, a few AI steps, every function live-tested), then Writ's own AI browser rung only if needed. guided: a browser bound to a build that the caller drives and composes (sign in, capture_network, define_function, save); with build_id it continues a parked build and inherits its map. 'auto': the same ladder with the caller as the last rung — own workflows and marketplace proposed first, then the fast path; not enough => the build parks as needs_guidance, to finish guided. 'fast' = starts on the fast path. 'crawl' / 'browser' = the whole-site static / rendered crawl (unverified maps). For compatibility, regular/deep remain aliases of guided."New value: +"intelligent (default, Writ builds it) | guided (the caller drives) | auto | fast | crawl | browser."
    • removedInput schema / properties / persona_id / description
      Removed value: -"Saved identity to sign in with (writ_personas). Without one, a site whose entry page is a sign-in wall is not built: the answer names the persona to pass, or returns `persona_needed` with `tell_user` (a message for the user) and `create_url`; a later call with the new persona_id builds. Required for 2FA: the code is minted server-side and never reaches the caller."
    • removedInput schema / properties / residential_country
      Removed value: -{
      -  "description": "Two-letter ISO country the residential exit should be in (e.g. 'us', 'fr'); applies to every rung of the build, the guided browser included. No value means an automatic exit. Ignored unless the session egresses residential.",
      -  "type": "string"
      -}
    • removedInput schema / properties / respect_robots
      Removed value: -{
      -  "description": "Crawl rungs (mode=crawl/browser) obey the site's robots.txt (default true). false is for a target the user vouches for after a rung reported robots.txt refused the crawl (`escalations` / `message` name the rule); otherwise such a rung fetches nothing and the build goes straight to a browser. Does not apply to the AI or guided browser rungs.",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / save_as / description
      Removed value: -"Name for the workflow the build saves."
    • removedInput schema / properties / scope
      Removed value: -{
      -  "description": "Crawl lanes: maps only this surface (e.g. 'employees') and what it depends on. No value maps the whole app.",
      -  "type": "string"
      -}
    • changedInput schema / properties / skip_existing / description
      Previous value: -"Skips the proposal of the user's own matching workflows (for after they declined)."New value: +"Skip the proposal of the user's own matching workflows."
    • changedInput schema / properties / skip_marketplace / description
      Previous value: -"Skips the ready-made marketplace proposals and builds fresh."New value: +"Skip the marketplace proposals."
    • removedInput schema / properties / url / description
      Removed value: -"The page that already shows the rows (search-results, category or listing URL), not the home page. Required unless build_id continues a parked build."
    • removedInput schema / properties / use_residential
      Removed value: -{
      -  "description": "Runs on the platform residential network (premium), for a site that blocks datacenter IPs. Default off. Continuing a build (build_id) keeps the build's own persona, residential exit and country unless these fields are passed.",
      -  "type": "boolean"
      -}
    • removedInput schema / required
      Removed value: -[]
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructive=true and openWorld=true, but the description adds real behavior: the call first proposes the user's saved workflows and marketplace APIs, then opens a cloud browser bound to the build, and capture_network/writ_browser_network/api_call probe the site's own calls. It also sets expectations that 'a failed probe is evidence, not the end' and that the run ends with writ_browser_save plus run_example on two inputs. It omits cost/persistence consequences of a destructive, non-idempotent cloud-browser build, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the prose is dense rather than padded, but the middle is a semicolon-chained run-on mixing tool names, internal commands (`flow`, from_index, run_example) and strategy in one breath, which makes it hard to parse. The information largely earns its place, yet the packing costs readability.

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

Completeness3/5

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

For a 13-parameter, zero-required, destructive build tool with no output schema, the description covers the pipeline and the closing steps but leaves the configuration surface (device, persona, residential proxy, execution target, build_id resumption) unexplained. It does at least state that the result is JSON-returning named functions, so return shape is not a total blank.

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

Parameters2/5

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

Schema coverage is only 15% and the description only compensates for url, goal, skip_existing and skip_marketplace (the last two are already documented in the schema). Nine parameters — device, save_as, build_id, anonymous, persona_id, idempotency_key, use_residential, execution_target, residential_country — carry no meaning in either place, and the presence of build_id hints at a resume mode that is never explained.

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 lead states a specific verb and outcome: 'TURNS A WEBSITE INTO A CALLABLE API (named functions with inputs, returning JSON)', and immediately disambiguates the key input by defining url as 'the page that already shows the rows (search results or a listing, not the home page)'. An agent can distinguish this from writ_browser_compose or writ_record_website because the description frames those as internal steps of this build rather than substitutes.

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 concrete usage conditions: the url must be a results/listing page not a home page, and skip_existing/skip_marketplace produce a fresh build instead of proposals. It also prescribes an order of attack (HTTP flows first, single requests mixed in, DOM extraction last) and points to writ_help('http_flows'). It stops short of saying when to choose this over writ_record_website or writ_crawl_site, so it is clear context without explicit exclusions.

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.