Skip to content
Validate custom tool definitions

Validate custom tool definitions

Check pasted tool definitions without saving or calling your endpoint.

POST/api/v1/custom-integrations/validate

Request#

TypeScript
const response = await fetch("https://api.smallworld.sh/api/v1/custom-integrations/validate", {
  method: "POST",
  headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
  body: JSON.stringify({
  "key": "example",
  "tools": [
    {
      "name": "lookup",
      "description": "Look up a record",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id"
        ]
      }
    }
  ]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
const result = await response.json();

Use your server-side apiKey. Replace the example IDs.

Request body#

keystring

Command prefix used to derive tool command names.

toolsunknownrequired

Definitions to check. Invalid definitions return validation feedback rather than being saved.

Responses#

Returns valid, a nullable list-level error, and per-tool index/name/command/mode/error feedback.

200 response
{
  "valid": true,
  "error": null,
  "tools": [
    {
      "index": 0,
      "name": "lookup",
      "command": "lookup",
      "mode": "unknown",
      "error": null
    }
  ]
}
More about this endpoint

Authenticate with a workspace API key. Unknown body fields and query parameters are rejected.