Skip to main content
Glama

Save a session as a workflow

writ_browser_save
Destructive

Save the open browser session as a clean, replayable workflow and close the browser, turning composed steps into runnable API functions and scheduled tasks.

Instructions

Save the open browser session as a clean, replayable workflow and close the browser. Everything you composed (writ_browser_compose) is materialized: named api functions become api_call steps with the auth function first, declared inputs become the workflow's parameters, explicit steps land at their position. The saved workflow is ACTIVE immediately: it runs on demand with writ_run_workflow (function_name calls one function) or its own run_ tool (writ_pin_workflow_tool) at zero AI cost, can be scheduled with writ_set_schedule, exposed as a REST endpoint with writ_expose_workflow_api, and documented at GET /api/v1/workflows/{id}/api-docs. A session bound to a build (writ_website_to_api guided) settles that build. The save is REFUSED, with the reasons, when a step or function references something no run could resolve — fix it in the session and save again. Only save once the task actually worked on the live page — verify first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoShort workflow name (defaults to the goal).
keep_openNoLeave the browser open after saving (default false — saving closes it).
session_idYes
descriptionNo
allow_no_dataNoSave a workflow that yields NO data (navigation/actions only) on purpose. Off by default: a save with no data step and no defined function is REFUSED for an API build (define_function or an extract first) and WARNED for a task recording — a workflow like that runs green and returns nothing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations (destructiveHint=true, openWorldHint=true) by disclosing that saving closes the browser, that the saved workflow is ACTIVE at zero AI cost, and that the save is REFUSED with reasons when a step cannot resolve at run time. The allow_no_data refusal/warning semantics add real behavioral detail. It does not explicitly restate the destructive/irreversibility angle beyond 'closes the browser,' so it lands short of 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.

Conciseness4/5

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

Front-loaded with the core action and outcome in the first sentence, with consequences and refusal conditions following in a logical order. It is dense with parenthetical tool cross-references, which is useful routing information but pushes the prose near the limit of what one tool description should carry.

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 still covers the mutation's side effects, activation state, refusal behavior, and follow-on tooling — enough for an agent to call it correctly. The one gap is the return value: it never says what a successful save yields (e.g. a workflow id) or what the refusal response looks like.

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 60%, and the description compensates on the ambiguous parameters: it clarifies keep_open means the browser stays open (default closes it), that name defaults to the goal, and it expands the allow_no_data refusal-vs-warning semantics well past the schema text. session_id and description remain undocumented in both places, which caps it below 5.

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?

Specific verb (save) plus resource (open browser session) plus the exact transformation: composed session materializes into a replayable workflow and the browser closes. It distinguishes itself from siblings by naming writ_browser_compose as the producer and writ_run_workflow / writ_pin_workflow_tool as the consumers, so an agent can place it in the lifecycle without reading other schemas.

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?

Gives an explicit gate: 'Only save once the task actually worked on the live page — verify first,' plus refusal conditions tied to unresolvable references. It also routes to the correct downstream tools for running, scheduling, exposing, and documenting the saved workflow. What is missing is a direct when-not-to-save rule versus sibling tools like writ_export_data or writ_record_website.

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