Skip to main content
Glama
workflows.py820 B
import union image = union.ImageSpec( name="union-mcp-example-workflows", builder="union", packages=["pandas", "pyarrow", "scikit-learn", "union"], ) actor = union.ActorEnvironment( name="add-multiply", ttl_seconds=120, container_image=image, ) @actor.task def add(a: int, b: int) -> int: """Add two numbers.""" return a + b @actor.task def multiply(a: int, b: int) -> int: """Multiply two numbers.""" return a * b @actor.task def append_hello(foo: str) -> str: """A task that prints a string and returns a string with 'hello' appended to the input.""" foo = foo + 123 # ❌ this is a bug! return foo @union.workflow def workflow(a: int, b: int) -> int: """A workflow that adds and multiplies two numbers.""" return multiply(add(a, b), add(a, b))

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