Dynamic MCP Input Test 1
Test MCP with dynamic arguments from workflow inputs
Workflow Information
ID: mcp_dynamic_input_test_v4
Namespace: default
Version: N/A
Created: 2025-06-25
Updated: 2025-06-25
Tasks: 2
Quick Actions
Inputs
| Name | Type | Required | Default |
|---|---|---|---|
timezone |
string | Optional |
UTC
|
time_format |
string | Optional |
iso
|
Outputs
No outputs defined
Tasks
get_time_dynamic
mcpGet current time using input parameters
verify_dynamic_result
scriptVerify the dynamic MCP call worked correctly
YAML Source
id: mcp_dynamic_input_test_v4
name: Dynamic MCP Input Test 1
tasks:
- id: get_time_dynamic
name: Get Time with Dynamic Parameters
type: mcp
tool_name: current_time
description: Get current time using input parameters
deployment_id: pod-smqpgmrz
tool_arguments:
format: ${time_format}
timezone: ${timezone}
timeout_seconds: 30
- id: verify_dynamic_result
name: Verify Dynamic Result
type: script
script: "import os\nimport json\nfrom datetime import datetime\n\nprint(\"\U0001F50D\
\ Dynamic MCP Test Verification\")\nprint(\"=\" * 50)\n\n# Get input parameters\n\
timezone = os.environ.get('timezone', 'UTC')\ntime_format = os.environ.get('time_format',\
\ 'iso')\n\nprint(f\"\U0001F4CB Input Parameters:\")\nprint(f\" - Timezone: {timezone}\"\
)\nprint(f\" - Format: {time_format}\")\n\n# Get the MCP task result\ntime_result\
\ = os.environ.get('get_time_dynamic', '{}')\nprint(f\"\\n\U0001F4CB MCP Result:\
\ {time_result}\")\n\ntry:\n if time_result and time_result != '{}':\n \
\ result_data = json.loads(time_result) if isinstance(time_result, str) else\
\ time_result\n \n # Check if result contains expected data\n \
\ if 'result' in result_data:\n actual_result = result_data['result']\n\
\ print(f\"\\n\u2705 Time Data Retrieved:\")\n print(f\"\
\ - Result Type: {type(actual_result)}\")\n \n if isinstance(actual_result,\
\ dict):\n for key, value in actual_result.items():\n \
\ print(f\" - {key}: {value}\")\n \n \
\ # Verify timezone matches input\n if 'timezone' in actual_result:\n\
\ if actual_result['timezone'] == timezone:\n \
\ print(f\"\\n\u2705 Timezone matches input: {timezone}\")\n \
\ else:\n print(f\"\\n\u274C Timezone mismatch:\
\ expected {timezone}, got {actual_result['timezone']}\")\n else:\n\
\ print(f\" - Time: {actual_result}\")\n \n \
\ print(\"\\n\u2705 SUCCESS: Dynamic MCP parameters worked correctly\")\n\
\ else:\n print(\"\\n\u274C No 'result' field in MCP response\"\
)\n \n else:\n print(\"\\n\u274C ERROR: No result received\
\ from MCP task\")\n \nexcept Exception as e:\n print(f\"\\n\u26A0\uFE0F\
\ Error parsing MCP result: {e}\")\n print(f\"\U0001F4C4 Raw result: {time_result}\"\
)\n\n# Summary\nprint(f\"\\n\U0001F4CA Test Summary:\")\nprint(f\"\U0001F3AF MCP\
\ Server: time\")\nprint(f\"\U0001F527 Tool: get_current_time\")\nprint(f\"\U0001F4E5\
\ Dynamic Inputs Used: timezone={timezone}, format={time_format}\")\nprint(f\"\
\u2705 Test demonstrates dynamic argument passing via workflow inputs\")"
depends_on:
- get_time_dynamic
description: Verify the dynamic MCP call worked correctly
inputs:
- name: timezone
type: string
default: UTC
description: Timezone for the time display (e.g., UTC, America/New_York)
- name: time_format
type: string
default: iso
description: Format for time display (iso, human, unix)
description: Test MCP with dynamic arguments from workflow inputs
| Execution ID | Status | Started | Duration | Actions |
|---|---|---|---|---|
30bb1da6...
|
COMPLETED |
2025-07-30
11:04:49 |
N/A | View |
70ca3add...
|
COMPLETED |
2025-07-30
11:02:28 |
N/A | View |
83d6fe14...
|
COMPLETED |
2025-07-30
10:55:55 |
N/A | View |
f63d49f0...
|
COMPLETED |
2025-07-30
10:37:13 |
N/A | View |
b5688e19...
|
COMPLETED |
2025-07-30
10:21:30 |
N/A | View |
2f15c0c0...
|
COMPLETED |
2025-07-15
14:44:18 |
N/A | View |
e2653415...
|
COMPLETED |
2025-07-06
03:42:52 |
N/A | View |
72c404a1...
|
COMPLETED |
2025-07-03
19:06:57 |
N/A | View |
61890d6b...
|
COMPLETED |
2025-06-25
12:18:05 |
N/A | View |
d8581cc6...
|
COMPLETED |
2025-06-25
11:46:33 |
N/A | View |