Tools

Invoke one of the agent's tools directly

Changed on

Runs a single tool and returns its result, with no model in the loop. Faster and deterministic where the agent is neither, and it incurs no LLM charges.

This needs a session because a tool belongs to one: the tools available are the ones the session's project has open, and the tool acts on that project's live state.

A tool that refuses answers 422 with the tool's own message. Permission refusals are deliberately indistinguishable from "no such tool" — a key cannot use the error to discover what it is not allowed to do.

post/api/v2/projects/{projectId}/sessions/{sessionId}/tools/invoke

Request

  • Base URL
    https://davinci-app.com
  • Auth
    HTTP bearer

Request body

toolboxstring required

Toolbox holding the tool, for example Core.

toolstring required
paramsobject

Arguments for the tool. Validated by the tool, not here.

Response

The tool ran and returned a result.

sessionIdstring uuid required
toolboxstring required
toolstring required
isErrorboolean required

Always false here — a tool that reported an error is answered as 422, so a 200 means the tool succeeded.

structuredContentobject

Present when the tool returns structured output as well as text.

Changes

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      endpoint added