Pre-configuration
General introduction
When doing regular function calling the agent exposes to the LLM what parameters the function needs through a schema. The LLM then answers with valid parameters matching this schema, allowing the agent to effectively execute the function. References here and here. This behavior integrates with the Model Context Protocol, more specifically the official TypeScript SDK, in the following way:- When defining the tools for an MCP server a Zod schema the inputs of the tool will be validated against can be provided.
- When listing tools using the
tools/listendpoint, this Zod schema is derived into a JSON schema, which is included in the response for the MCP client to show the LLM. - The answer of the LLM contains valid inputs, which can be passed in turn to the
tools/callendpoint directly. When calling a tool the input is validated against the Zod schema.
TypeScript
Integration in the Agent Builder
In some contexts, some of the parameters should be pre-configured. Notable examples include static URLs, mail addresses, certain inputs to API calls: parameters that are not known by the model and should be set statically when configuring the tool. We provide input schemas that you can use when defining a tool to enable the following behavior:- Input parameters can be defined and configured in the Assistant Builder.
- These parameters are hidden from the LLM.
- Pre-configured values are injected when the tool runs.
TypeScript
python
JSON
JSON
JSON