Skip to main content
Glama

list_workflows

Retrieve all workflows available in a specified project and domain to manage and utilize Union automation processes.

Instructions

List all workflows in a project and domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes
projectYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'list_workflows', registered via @mcp.tool(), takes project and domain, delegates to resources.list_workflows
    @mcp.tool()
    @require_auth
    def list_workflows(
        project: str,
        domain: str,
        ctx: Context,
    ) -> list[resources.WorkflowMetadata]:
        """List all workflows in a project and domain."""
        remote = _remote(project, domain)
        print(f"Listing workflows in project {project} and domain {domain}")
        return resources.list_workflows(remote, project, domain)
  • Pydantic schema/model for WorkflowMetadata returned by list_workflows
    class WorkflowMetadata(BaseModel):
        name: str
        description: str
        inputs: dict
        outputs: dict
  • Helper function implementing the core logic: fetches workflows via remote.client.list_workflows_paginated and maps to WorkflowMetadata instances
    def list_workflows(remote: union.UnionRemote, project: str, domain: str) -> list[WorkflowMetadata]:
        from flytekit.models.common import NamedEntityIdentifier
    
        id = NamedEntityIdentifier(project=project, domain=domain)
        workflow_models, _ = remote.client.list_workflows_paginated(id, limit=100)
        workflows = [w.to_flyte_idl() for w in workflow_models]
        return [
            WorkflowMetadata(
                name=workflow.id.name,
                description=workflow.short_description,
                inputs=proto_to_json(workflow.closure.compiled_workflow.primary.template.interface.inputs),
                outputs=proto_to_json(workflow.closure.compiled_workflow.primary.template.interface.outputs),
            )
            for workflow in workflows
        ]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'List all workflows' but doesn't disclose behavioral traits such as pagination, rate limits, authentication needs, or what 'all' entails (e.g., includes archived workflows). The description is minimal and misses key operational details for a listing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It is front-loaded with the core action and scope, making it easy to parse quickly. Every word contributes directly to the tool's purpose without redundancy.

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?

Given the tool's low complexity (2 simple parameters) and the presence of an output schema (which handles return values), the description is somewhat complete for basic understanding. However, with no annotations and poor parameter coverage, it lacks sufficient context for safe and effective use, such as error handling or behavioral nuances.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'project and domain' but doesn't explain what these parameters mean (e.g., domain as organizational scope, project as container). No format, examples, or constraints are provided, leaving parameters largely undocumented beyond their names.

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 clearly states the verb ('List') and resource ('all workflows'), specifying the scope ('in a project and domain'). It distinguishes from siblings like 'get_execution' or 'run_workflow' by focusing on listing rather than retrieving or executing. However, it doesn't explicitly differentiate from 'list_tasks', which might cause ambiguity in sibling selection.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'list_tasks' or 'get_execution'. It lacks context on prerequisites (e.g., needing valid project/domain) or exclusions (e.g., not for filtered workflows). This leaves the agent with minimal direction for tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/unionai-oss/union-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server