Create Tool Server API Definition
The Create Tool Server API enables you to register Model Context Protocol (MCP) compliant servers that expose tools for use by AI agents. Tool servers act as bridges between your enterprise systems and the Vectara platform, making capabilities like database queries, API integrations, and custom business logic available to agents through a standardized protocol.
This API is fundamental to extending agent capabilities beyond built-in functions, allowing organizations to expose their internal systems, third-party integrations, and custom tools in a secure, managed way that maintains governance and access control.
Create Tool Server Request and Response
To create a tool server, send a POST request to /v2/tool_servers
. You specify the following parameters in the request body:
name
(string, required): The human-readable name of the tool servertype
(string, required): Must bemcp
(Model Context Protocol)description
(string, optional): A detailed description of what this tool server providesuri
(string, required): The URI of the tool server (must be a valid URI)transport
(string, required): Transport protocol, must besse
(Server-Sent Events)headers
(object, optional): HTTP headers to include when connecting to the serverauth
(object, optional): Authentication configuration for connecting to the tool server- Various auth types supported (see Authentication documentation)
enabled
(boolean, optional): Whether the server is enabled upon creation (defaults totrue
)metadata
(object, optional): Arbitrary metadata for tracking and organization
The response includes the complete tool server configuration with a system-generated ID and timestamps.
Example Request
1
Example Response
1
Error Responses
The API returns standard HTTP error codes with detailed error information:
HTTP Code | Error Code | Description |
---|---|---|
400 | invalid_request | Missing required fields or malformed request structure |
400 | invalid_uri | URI format is invalid or uses unsupported protocol |
400 | invalid_transport | Transport must be 'sse' |
400 | invalid_type | Type must be 'mcp' |
401 | unauthorized | Invalid or missing API key |
403 | forbidden | Insufficient permissions for creating tool servers |
409 | server_exists | A tool server with this URI already exists |
429 | rate_limit_exceeded | Tool server creation rate limit exceeded |
Next Steps
After creating a tool server, you should:
- Synchronize the server to discover available tools using the Sync Tool Server API
- Verify tools were discovered using the List Tools API
- Configure agents to use the discovered tools