Payload for Creating a Tool Association
When granting a new executable capability to your MCP server via the/servers/{serverId}/tools endpoint, the integration relies heavily upon explicitly proving the relationship framework.
The Rigid Request Structure
Unlike updating an abstract entity (which only requires localized changes), forming an association is an absolute mapping mechanism. The payload mandates constructing aCreateServerToolRequest housing a tool block.
Mandatory Fields
Thetool object strictly requires all three of these properties to execute correctly:
serverID(string): The 11-character hash dictating the target MCP environment. This must perfectly match the{serverId}deployed in the URL path of your POST request.providerID(string): The 11-character hash indicating the root API Provider which currently “owns” the original tool logic.toolID(string): The specific 11-character hash that points exactly to the executable tool configuration living inside the provider.
The JSON Format
Why are all three IDs required?
HasMCP thrives on secure multi-provider routing. By forcing the inclusion of theproviderID alongside the toolID, the system definitively protects against traversal or orphaned ID injections. The controller actively verifies:
- Does the specified
providerIDexist? - Does the specified
toolIDphysically belong to that explicit Provider? - If valid, lock that verified capability to the
serverID.