Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.praison.ai/llms.txt

Use this file to discover all available pages before exploring further.

Workflow and deploy MCP tools accept only YAML files inside the current working directory for security.

Quick Start

1

Valid Usage

# MCP tools accept bare YAML filenames
workflow_validate("project.yaml")  # ✅ Works
workflow_show("config.yml")        # ✅ Works
deploy_validate("deploy.yaml")     # ✅ Works
2

Rejected Usage

# These paths are rejected for security
workflow_validate("../config.yaml")     # ❌ ValueError
workflow_validate("/etc/passwd")        # ❌ ValueError
workflow_validate("subdir/file.yaml")   # ❌ ValueError

How It Works

Three MCP tools now enforce strict path validation:
ToolPurposePath Requirement
workflow_validateValidate workflow YAMLBare filename in CWD
workflow_showDisplay workflow contentBare filename in CWD
deploy_validateValidate deployment configBare filename in CWD

What Gets Refused

Breaking Change: Absolute paths and outside-CWD paths that previously worked are now rejected.
Path PatternExampleError Message
Contains / or \subdir/file.yamlinvalid file_path: 'subdir/file.yaml'
Contains NUL bytefile\x00.yamlinvalid file_path: 'file\x00.yaml'
Starts with ..hidden.yamlinvalid file_path: '.hidden.yaml'
Not YAML extensionconfig.jsonfile_path must be a .yaml or .yml file
Absolute path/etc/passwdinvalid file_path: '/etc/passwd'
Parent directory../config.yamlinvalid file_path: '../config.yaml'
Resolves outside CWDsymlink.yaml../outside.yamlinvalid file_path: 'symlink.yaml'

Migration

If you previously used these MCP tools with absolute paths or subdirectory paths:
1

Move Files to CWD

# Before (worked previously)
workflow_validate("/home/user/project/workflows/main.yaml")
workflow_validate("workflows/deploy.yaml")

# After (required now)
cp /home/user/project/workflows/main.yaml ./main.yaml
cp workflows/deploy.yaml ./deploy.yaml
workflow_validate("main.yaml")
workflow_validate("deploy.yaml")
2

Update Tool Calls

# Before
deploy_validate("configs/production.yaml")

# After  
deploy_validate("production.yaml")  # file must be in CWD

Common Patterns

Workflow Management

# Validate workflow in current directory
result = workflow_validate("workflow.yaml")
if "valid" in result:
    content = workflow_show("workflow.yaml")
    print(content)

Deployment Validation

# Check deployment config
result = deploy_validate("deploy.yml") 
if "valid" in result:
    print("Deployment config is valid")
else:
    print(f"Validation failed: {result}")

Error Handling

try:
    content = workflow_show("../outside.yaml")
except Exception as e:
    print(f"Error: {e}")
    # Error: invalid file_path: '../outside.yaml'

Best Practices

Place workflow and deployment YAML files in the project root directory, not in subdirectories. This matches the MCP security model.
Since you can’t use paths, use descriptive filenames like production-deploy.yaml instead of deploy/production.yaml.
Always call the validation tools before processing YAML files to catch configuration errors early.
Check for ValueError exceptions and provide helpful error messages to users when paths are rejected.

MCP Integration

Learn about MCP protocol support

CLI Tools

PraisonAI CLI command reference