Skip to main content
Glama

Detect Candidate Workflows in Document

detect_workflows
Read-onlyIdempotent

Discover distinct operational workflows from multi-section documents or raw text before compiling. Returns candidate workflows (id, title, description, sourceIds) audited by TypeSafe Jev.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "detect_workflows"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoOptional raw document text if `sources` is not pre-segmented.
sourcesNoArray of source excerpts `{id, locator, excerpt, modality?, confidence?}` from the document.
authTokenNoOptional session token (`utok_...`) if not passed via Authorization header.
granularityNoHierarchy detail hint: 'overview' (parent + phases summary), 'subprocess', or 'all' (default).
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`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields 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"
      +}
    • addedInput schema / properties / granularity
      Added value: +{
      +  "description": "Hierarchy detail hint: 'overview' (parent + phases summary), 'subprocess', or 'all' (default).",
      +  "enum": [
      +    "overview",
      +    "subprocess",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / sources / description
      Previous value: -"Array of source excerpts `{id, locator, excerpt}` from the document."New value: +"Array of source excerpts `{id, locator, excerpt, modality?, confidence?}` from the document."
    • addedInput schema / properties / sources / items / properties / confidence
      Added value: +{
      +  "description": "Optional evidence grounding confidence ('verbatim', 'reviewed', or 'inferred').",
      +  "enum": [
      +    "verbatim",
      +    "reviewed",
      +    "inferred"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / sources / items / properties / excerpt / description
      Added value: +"Faithful document excerpt (do not rewrite)"
    • addedInput schema / properties / sources / items / properties / id / description
      Added value: +"Unique chunk ID (e.g. 's1', 's2')"
    • addedInput schema / properties / sources / items / properties / locator / description
      Added value: +"Heading, page, or section locator"
    • addedInput schema / properties / sources / items / properties / modality
      Added value: +{
      +  "description": "Optional evidence modality ('text', 'image', 'diagram', or 'table').",
      +  "enum": [
      +    "text",
      +    "image",
      +    "diagram",
      +    "table"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / sources / items / properties / name
      Added value: +{
      +  "description": "Document or file name",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so safety is covered. The description adds genuine beyond-annotation value by disclosing the return payload ('id, title, description, sourceIds') and that results pass a 'TypeSafe Jev' audit, which tells the agent output is validated rather than raw extraction. It does not mention that evidenceCoverage can trigger an EVIDENCE_NOT_INSPECTED flag — that behavior lives only in the schema text.

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?

Two tightly written sentences with the purpose front-loaded and the return contract second — no filler. The only friction is the unexplained internal term 'TypeSafe Jev' and 'sourceIds', which are not defined here.

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 five optional parameters and no output schema, the description does the right job of naming the returned fields and the discovery step's position in the pipeline. What is missing is any hint that supplying evidenceCoverage changes/annotates the result (the EVIDENCE_NOT_INSPECTED path) and any statement of scale limits for large documents.

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% with enums and nested objects fully documented, so the schema already carries parameter meaning. The description only echoes the text/sources distinction ('multi-section documents or raw text') and adds no syntax, precedence, or defaults beyond it, which is the expected baseline when the schema does the heavy lifting.

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 and resource ('Discover distinct operational workflows') plus the accepted inputs ('multi-section documents or raw text'), and the clause 'before compiling' separates it from compile_workflow in the sibling list. An agent can identify this as the pre-compilation discovery step without opening the schema.

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?

'...before compiling' establishes clear pipeline context: use this when a document has not yet been turned into a workflow spec. It stops short of naming compile_workflow as the explicit follow-up or stating when not to use it (e.g. when a workflow spec already exists), so it is clear context without exclusions.

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.