Skip to main content
Write a plain Python function, register it, and load it from the manifest as a tool. A tool is the atom of work — a plain Python function the runtime exposes as an MCP tool. You write the function, decorate it with @tai42_app.tools.tool, and name its module in the manifest. Importing the module runs the decorator, which registers the tool on the server.

Write the tool module

Put your function in a module in your own package and register it through the tai42_app handle. The decorator returns the function unchanged, so the module stays ordinary Python.
myapp/tools.py
The function’s signature becomes the tool’s input schema and its docstring becomes the tool description, so annotate the parameters and write a real docstring.

Load it from the manifest

Name the module under tools[].module. Each entry imports the module; include filters which tool names to expose (omit it to expose every tool the module defines).
manifest.yml
The module must be importable from the server process, so keep your package on PYTHONPATH.

Run and call it

1

Start the server

Point the server at your manifest and start it.
2

Confirm it registered

List the registered tools and inspect one tool’s schema.
3

Run it

Call the tool synchronously and print its result. Pass arguments with the repeatable --kw key=value (each value is parsed as JSON), or a whole JSON object with --kwargs.
Long-running work does not have to block a request. Submit a detached run with tai tools runs submit, then poll it with tai tools runs get.

See also