Datamodel
Tool Element
Element for defining MCP integrations
Tool Element
Coming soon: This feature is not yet available. Please check back soon.
The <tool>
element defines an MCP (Multi-provider Context) integration, typically representing an external service or API. It makes the capabilities of this service available to <script>
and <llm>
elements within the application.
Props
Prop | Type | Default |
---|---|---|
type | "mcp" | "function" | - |
id | string | - |
url? | string | - |
function? | function | - |
args? | object | - |
Examples
Basic MCP Tool
Defines a single tool for accessing a weather API.
Multiple MCP Tools
Multiple tools can be defined within a <datamodel>
to integrate with various services.
Usage Notes
<tool>
elements are defined within a<datamodel>
element.- They act as pointers to external MCP-compliant services.
- The
id
is crucial for referencing the tool elsewhere in the application. - The
url
must point to a valid MCP server endpoint. - See the Using MCP Integrations guide for details on how to use these tools in scripts and LLMs.