generate_segments
Render every actionable segment asset (images, video clips, overlays) across the project, in dependency order. THE most expensive call in the pipeline: ALWAYS dry_run=true first, show your user the estimate next to get_credit_balance, and wait for a fresh yes before the real run — prior blanket p...
This record as markdown: /tools/com-framesail-framesail/generate-segments.md
What generate_segments does on Framesail
AI agents use generate_segments to create or update resources in Framesail, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Framesail environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | boolean | — | True returns the credit-cost estimate without rendering anything; ALWAYS run true first and get user approval before the real run |
project_id | string | Yes | Project ID, as returned by create_project or list_projects |
segment_numbers | object | — | 1-based segment numbers (from get_segments) to render only a subset; omit to render every actionable asset in the project |
Parameters from the server's own tool schema.
Why generate_segments is rated Medium
An AI agent can call generate_segments faster than any human can review: one bad instruction and it creates or modifies resources in Framesail by the hundred, each call as confident as the last.
Risk signalsBulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs generate_segments safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Framesail, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For generate_segments, this is the rule to start with:
generate_segments stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Framesail, apply this rule, and every generate_segments call is checked against it from then on.
Questions about generate_segments
Render every actionable segment asset (images, video clips, overlays) across the project, in dependency order. THE most expensive call in the pipeline: ALWAYS dry_run=true first, show your user the estimate next to get_credit_balance, and wait for a fresh yes before the real run — prior blanket permission ("do the whole thing") does not cover this spend. Pass segment_numbers to render only a subset — e.g. segments 1-18 for the opening minute before committing to the full video. Safe to re-run: completed and currently-generating assets are skipped, so a second call only picks up new/failed work. Async — one job per asset; await_jobs until all complete. It is categorised as a Write tool in the Framesail MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
generate_segments accepts 3 parameters: dry_run, project_id, segment_numbers. Required: project_id. The full parameter table on this page comes from the server's own tool schema.
Register the Framesail MCP server in PolicyLayer and add a rule for generate_segments: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Framesail. Nothing to install.
generate_segments is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the generate_segments rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for generate_segments. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
generate_segments is provided by the Framesail MCP server (https://api.framesail.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Framesail, and thousands of servers like it.
This server
Across the catalogue