Skip to main content

Declare a tool catalog

Targets that speak the Responses API can carry a tool catalog: the tools your system exposes. Spectral uses it to drive and grade tool calls, not just text replies.

The catalog is an OpenAI tools array, set on the target's config.tool_catalog. Each entry follows the OpenAI tool schema; Spectral accepts function tools, MCP tools, and hosted tools (web search, file search, and the like):

config.tool_catalog
"tool_catalog": [
{
"type": "function",
"name": "get_order_status",
"description": "Look up the delivery status of an order.",
"parameters": {
"type": "object",
"properties": { "order_id": { "type": "string" } },
"required": ["order_id"]
}
}
]

For the full schema of each tool type, see OpenAI's function calling guide and the tools parameter of the Responses API. You can set the tool catalog when you create the target and edit it afterward.