Skip to main content
Glama

flow_synthesize

Generate runnable replay code (curl/TypeScript/Go/Python) from captured network calls, automatically chaining dependencies like auth tokens as variables for clean, reviewable scripts.

Instructions

Synthesize replay code (curl/TypeScript/Go/Python) for the captured network calls since the last flow_mark (or the whole buffer), chaining detected dependencies (e.g. an auth token from one response into a later request) as variables instead of baked-in literals. Dependency detection (exact / url-encoded / base64 / JWT-claim / substring): a value that came verbatim from an earlier response is lifted to a variable; unmatched values (base64/encoded/JWT-internal, user-supplied literals) stay literal for you to review, and a request input echoed back in a response may be over-chained.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
redactNoreplace unmatched secret-bearing HEADER values (authorization/cookie, or any header value that looks like a long opaque token) and whole-literal request bodies with numbered env placeholders instead of the live value; does NOT cover url-query params or individual JSON-body fields, and chained (dependency-resolved) values are unaffected
targetYes
sinceSeqNooverride the window start; default is the session's flow_mark, else 0
sessionIdNo
includeAllNoinclude non-XHR/Fetch resource types (default: XHR/Fetch only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It details dependency detection methods (exact, url-encoded, base64, JWT-claim, substring), explains that unmatched values stay literal for review, and warns about potential over-chaining. This is substantial behavioral disclosure, though it does not mention side effects or whether it mutates state.

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?

The description is a single dense paragraph that front-loads the purpose and then details dependency chaining. Every sentence adds value, and there is no fluff. It could be restructured with bullet points for the detection types, but it is efficient and appropriately sized for the complexity.

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?

The description explains the core behavior well, but with no output schema, it does not explicitly describe the return value (the generated code) or any prerequisites (e.g., having captured calls). It implies the output by saying 'synthesize replay code' and the target enum, but it does not clarify whether the tool modifies state or what the code contains beyond variables. Some gaps remain for a complex 5-parameter tool.

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

Parameters3/5

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

Schema description coverage is 60% (redact, sinceSeq, includeAll have descriptions; target and sessionId do not). The description adds context about the window (since last flow_mark) and mentions 'whole buffer' which relates to sinceSeq, but it does not explain target (though enum values are self-explanatory) or sessionId. The description partially compensates for missing schema fields but not fully.

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 description states a specific action (synthesize replay code) with a clear resource (captured network calls) and lists the target languages (curl/TypeScript/Go/Python). It distinguishes itself from siblings like flow_replay (which likely executes code) and flow_export (which may export data) by focusing on code generation.

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?

The description gives clear context: it operates on captured network calls since the last flow_mark or the whole buffer. It implies when to use it (when you need replay code) but does not explicitly exclude alternatives or mention when not to use it. There is enough context for an agent to understand its role among siblings.

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