Skip to main content
Glama

Scaffold a first-draft Workbench flow

workbench_flows_scaffold

Creates a runnable first-draft flow from a spec you author: pick the simplest pattern that fits (classifier for read-and-bucket, structurer for transform/extract/draft-for-review, agent for genuinely conversational), write a production-quality system prompt grounded in what the user told you, and mark anything stubbed with [STUB: ...] markers plus stubNotes. The draft opens in Workbench's simple editor at /w//flows/ — give the user that path. May return needs_confirmation; show the user what you're proposing and wait for their approval, then re-call with the approvalId. When the draft comes from a Compass change, pass its opportunityId so the flow and the change point at each other (Compass shows 'Open in Workbench'; the flow shows where it came from). Then: workbench_flows_run to try it, workbench_flows_publish when it's ready for schedules and share links.

Input Schema

NameRequiredDescriptionDefault
modeYesPattern editor the draft opens in. Pick interviewer for conversations that LEARN something from a person (research calls, intake, retros) — pair it with workbench_flows_share_create so non-account humans can talk to it.
modelNoThe model node slug the draft runs on, from workbench_node_catalog_get, that the workspace allows. For a classifier, a `decision` entry (Jev, Kev, Solar Decide); defaults to TypeSafe: Jev Latest. Otherwise an `llm` entry (e.g. an OpenAI, Anthropic, or Google model); defaults to Claude Haiku 4.5. Set it here rather than editing the flow afterwards.
flowNameYesImperative + specific, ≤80 chars.
stubNotesNoWhat's stubbed / missing / worth wiring next.
variablesNoagent / interviewer: types and descriptions for the {{tokens}} in systemPrompt. Every {{token}} becomes a variable on its own (the test pane and scenarios list it, the app fills it per user at run time); pass this only to set a type other than string or say what fills it.
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this.
approvalIdNoApproval id from a prior needs_confirmation response. Omit on the first call.
categoriesNoclassifier only: 2-12 buckets. The classifier asks the systemPrompt as one pick-one question with these as the options, and returns `values.category` plus `answers.category` (probabilities and confidence).
descriptionNo1-2 sentences: what it does, where it fits.
systemPromptNoThe draft's behavior — production-quality first attempt with [STUB: ...] / [FILL IN: ...] markers where reality is missing. Required for structurer and classifier. Leave it out of an agent to get the bare model with no instructions (a 'promptless' agent).
opportunityIdNoCompass change (from compass_opportunities_list) this draft implements. Sets the flow ↔ change link; refused when the change already has a draft.
inputDescriptionNoWhat the flow's single input carries.
responseSchemaJsonNostructurer only: the output JSON Schema, JSON-encoded as a string (object root, required fields, additionalProperties false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / variables
      Added value: +{
      +  "description": "agent / interviewer: types and descriptions for the {{tokens}} in systemPrompt. Every {{token}} becomes a variable on its own (the test pane and scenarios list it, the app fills it per user at run time); pass this only to set a type other than string or say what fills it.",
      +  "items": {
      +    "properties": {
      +      "description": {
      +        "description": "What the app passes in, e.g. 'The member's first name, from the CRM'.",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "The token's name, as in {{name}}.",
      +        "type": "string"
      +      },
      +      "type": {
      +        "description": "Default string.",
      +        "enum": [
      +          "string",
      +          "number",
      +          "boolean",
      +          "array",
      +          "object"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / categories / description
      Previous value: -"classifier only: 2-12 buckets."New value: +"classifier only: 2-12 buckets. The classifier asks the systemPrompt as one pick-one question with these as the options, and returns `values.category` plus `answers.category` (probabilities and confidence)."
    • changedInput schema / properties / model / description
      Previous value: -"The model node slug the draft runs on — an `llm` entry from workbench_node_catalog_get that the workspace allows (e.g. an OpenAI, Anthropic, or Google model). Defaults to Claude Haiku 4.5. Set it here rather than editing the flow afterwards."New value: +"The model node slug the draft runs on, from workbench_node_catalog_get, that the workspace allows. For a classifier, a `decision` entry (Jev, Kev, Solar Decide); defaults to TypeSafe: Jev Latest. Otherwise an `llm` entry (e.g. an OpenAI, Anthropic, or Google model); defaults to Claude Haiku 4.5. Set it here rather than editing the flow afterwards."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only tell us this is a non-read-only, non-destructive, non-open-world write. The description adds real behavioral context beyond that: a possible `needs_confirmation` response requiring approvalId re-call, the fact that opportunityId is refused when a change already has a draft, and the returned editor path to surface to the user.

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 before branching into pattern choice, stubbing, user-facing path, approval flow, and next steps. Dense but nearly every sentence carries actionable instruction; slightly long and could be split, but no filler.

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

Completeness5/5

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

For a 13-parameter creation tool with no output schema, the description covers the return semantics (editor path, needs_confirmation), the approval loop, the cross-tool link, and the follow-on tools. Nothing an agent needs to call it correctly appears missing.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-parameter workflow meaning the schema can't convey: approvalId is only for a re-call after needs_confirmation, and opportunityId creates the bidirectional Compass link. That is genuine value over the per-parameter schema text.

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+resource ('Creates a runnable first-draft flow from a spec you author') and immediately scopes it against the update/create siblings by describing it as a first-draft generator. The pattern-selection guidance (classifier/structurer/agent/interviewer) further pins down exactly what kind of artifact is produced.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicit when-to-use guidance: 'classifier for read-and-bucket, structurer for transform/extract/draft-for-review, agent for genuinely conversational.' It also routes the agent forward to workbench_flows_run and workbench_flows_publish, and explains the needs_confirmation re-call path.

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.

Resources