Skip to main content
Glama

AI Enhance Workflow (TypeSafe Jev Audit & Repair)

enhance_workflow

Bundled free semantic verification and repair powered by TypeSafe Jev. Audits the VisualSpec against its cited sources[] for unsupported claims, missing decision branches, and role accuracy, applies targeted repair if actionable issues are found, and returns the enhanced spec, svg, mermaid, excalidraw, studioUrl, and Jev quality metrics.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "spec": "<spec>",
      "visualId": "<visualId>",
      "confirmEnhance": "<confirmEnhance>"
    },
    "name": "enhance_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYesThe current VisualSpec JSON object (including its `sources` array) to audit and enhance.
visualIdYesThe owned `jobId` or `visualId` returned when the workflow was compiled. Required for AI Enhance on the hosted service.
authTokenNoOptional session token (`utok_...`) if not passed via Authorization header.
includeSvgNoExplicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid').
renderFormatNoOptional output size control (MCP defaults to 'mermaid' for the host to render). Use 'preview' for a bounded inline PNG on the hosted service, with Mermaid and an owner-only SVG URL when available, or 'svg'/'mermaid' for a single format.
confirmEnhanceYesSet true only after the user confirms AI Enhance. Enhance does not use generation credits.
maxPreviewWidthNoTarget preview width bound in px for responsive preview metadata (default 1200).
evidenceCoverageNoOptional document preflight coverage report from the host agent (`pagesExamined`, `totalPages`, `textExtracted`, `tablesExtracted`, `embeddedDiagramsDetected`, `omittedMedia`, `notes`). When omitted media or uninspected diagrams are reported, Unseen flags `EVIDENCE_NOT_INSPECTED`.
maxPreviewHeightNoTarget preview height bound in px for responsive preview metadata (default 900).
includeExcalidrawNoExplicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / confirmEnhance
      Added value: +{
      +  "description": "Set true only after the user confirms AI Enhance. Enhance does not use generation credits.",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "spec"
      -]New value: +[
      +  "spec",
      +  "visualId",
      +  "confirmEnhance"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / renderFormat / description
      Previous value: -"Optional output size control (defaults to 'full'). Use 'preview' for a bounded inline PNG on the hosted service, with Mermaid and an owner-only SVG URL when available, or 'svg'/'mermaid' for a single format."New value: +"Optional output size control (MCP defaults to 'mermaid' for the host to render). Use 'preview' for a bounded inline PNG on the hosted service, with Mermaid and an owner-only SVG URL when available, or 'svg'/'mermaid' for a single format."
  3. Changed1 schema field changed
    • addedInput schema / properties / evidenceCoverage
      Added value: +{
      +  "description": "Optional document preflight coverage report from the host agent (`pagesExamined`, `totalPages`, `textExtracted`, `tablesExtracted`, `embeddedDiagramsDetected`, `omittedMedia`, `notes`). When omitted media or uninspected diagrams are reported, Unseen flags `EVIDENCE_NOT_INSPECTED`.",
      +  "properties": {
      +    "embeddedDiagramsDetected": {
      +      "type": "number"
      +    },
      +    "notes": {
      +      "type": "string"
      +    },
      +    "omittedMedia": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "pagesExamined": {
      +      "type": "number"
      +    },
      +    "tablesExtracted": {
      +      "type": "boolean"
      +    },
      +    "textExtracted": {
      +      "type": "boolean"
      +    },
      +    "totalPages": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / renderFormat / description
      Previous value: -"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."New value: +"Optional output size control (defaults to 'full'). Use 'preview' for a bounded inline PNG on the hosted service, with Mermaid and an owner-only SVG URL when available, or 'svg'/'mermaid' for a single format."
    • changedInput schema / properties / visualId / description
      Previous value: -"The `jobId` or `visualId` returned when the workflow was compiled."New value: +"The owned `jobId` or `visualId` returned when the workflow was compiled. Required for AI Enhance on the hosted service."
  5. Changed5 schema fields changed
    • addedInput schema / properties / includeExcalidraw
      Added value: +{
      +  "description": "Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full').",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeSvg
      Added value: +{
      +  "description": "Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid').",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / maxPreviewHeight
      Added value: +{
      +  "description": "Target preview height bound in px for responsive preview metadata (default 900).",
      +  "type": "number"
      +}
    • addedInput schema / properties / maxPreviewWidth
      Added value: +{
      +  "description": "Target preview width bound in px for responsive preview metadata (default 1200).",
      +  "type": "number"
      +}
    • addedInput schema / properties / renderFormat
      Added value: +{
      +  "description": "Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format.",
      +  "enum": [
      +    "full",
      +    "preview",
      +    "compact",
      +    "svg",
      +    "mermaid"
      +  ],
      +  "type": "string"
      +}
  6. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful context: the tool is 'bundled free' and runs semantic verification with repair. However, it leaves a key ambiguity for a non-read-only, non-idempotent tool: whether 'applies targeted repair' persists changes to the stored workflow or only returns an enhanced spec, and whether repeated calls compound changes.

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 definition is one dense sentence that is front-loaded with the audit-and-repair purpose before listing return values. It contains no filler or repetition. It is slightly long and packs three audit criteria plus six output fields into a single clause, but every element earns its place.

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 ten-parameter tool with a nested object and no output schema, the description does well to enumerate the returned spec, svg, mermaid, excalidraw, studioUrl, and quality metrics. The main gap is the persistence question: it never says whether the enhanced spec replaces the stored workflow or is only returned. That matters for a mutating, non-idempotent operation, and the confirmation requirement is buried in the schema.

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 100%, so the schema already documents all ten parameters, including the enum for renderFormat and the nested evidenceCoverage object. The description only reinforces that spec carries a sources[] array and lists the returned artifacts. It adds no syntax or format detail beyond what the schema provides, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: audits a VisualSpec against its cited sources[] for unsupported claims, missing decision branches, and role accuracy, then applies targeted repair. It is clear what the tool does and what it returns. It does not explicitly contrast with close siblings such as autofix_workflow or revise_workflow, so an agent must infer which one to choose.

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

Usage Guidelines3/5

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

Usage is only implied: the tool runs when you want semantic verification and repair of a compiled spec, and repair happens only 'if actionable issues are found.' The description never states when to prefer this over autofix_workflow or revise_workflow, nor what prerequisites exist. The confirmation requirement appears only in the confirmEnhance parameter description, not in the main text.

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.