Guide for building tools with TextLayer Core
@tool_call
and @observe
that can be called by AI systems. There are two main approaches to implementing tools:
@tool_call
and @observe
. These are suitable for simple functionality that doesn’t require complex business logic or external service interactions.
@observe
decorator from Langfuse tracks the function’s execution for monitoring and tracing, while the @tool_call
decorator from Vaul enables the function to be called by AI systems.SQLiteDatastore
service, executes the query, and returns the result as a markdown table.
@tool_call
decorator from Vaul automatically generates OpenAPI schemas from your function signatures and docstrings. These schemas are then passed to LLMs like GPT-4o to enable them to understand and use your tools.
Toolkit
class, which: