Skip to main content
A tool is the function contract a model can call. This page describes the request body that creates a tool and the tool resource that the API returns. For a task-oriented walkthrough, see Tools. All tool endpoints are under https://api.oumi.ai/v1/projects/{project_id}/tools. Request and response fields use camelCase.

CREATE TOOL REQUEST

POST /v1/projects/{project_id}/tools
The web app’s create form accepts a narrower toolName than the API. It requires lowercase snake_case that starts with a letter, for example get_weather. The form also requires an output schema, when you provide one, to be an object schema.

UPDATE TOOL REQUEST

PATCH /v1/projects/{project_id}/tools/{tool_id} Tools are immutable. The update request accepts only a new display name.
To change any other field, create a new tool.

TOOL

The API returns this object from create, get, update, and list requests.

LIST TOOLS

GET /v1/projects/{project_id}/tools The response contains tools, nextPageToken, previousPageToken, pageSize, and totalCount.

VALIDATION RULES

  • parameters must be a valid JSON Schema (Draft 2020-12) of type: "object".
  • Every name in parameters.required must be declared in parameters.properties.
  • outputSchema, when present, must be a valid JSON Schema (Draft 2020-12).
  • oneOf, allOf, not, if, then, and else are rejected anywhere in parameters or outputSchema. Property names are exempt, so a property named not is allowed.
  • anyOf is allowed in nested schemas but rejected at the root of parameters or outputSchema.
  • An update request accepts only displayName. All other fields are immutable.
  • A delete request returns 409 Conflict while implementations still serve the tool. Delete those implementations first.
  • Requests that fail schema validation return 422.