---
title: "Execute Tool Inline"
method: POST
path: "/workflows/v1/tools/execute"
tags: ["Tools"]
---

# Execute Tool Inline

`POST /workflows/v1/tools/execute`

Execute a fully inline tool config (not yet persisted) against the supplied argument values and
return its output.

Runtime failures (bad args, thrown exceptions, timeouts) are returned as HTTP 200 with
``success=False`` and a clean ``error`` message rather than a 500, so callers can render them inline.

Note: inline-Python tools run their code via ``exec`` server-side and are not sandboxed. This endpoint
is intended for authoring/debugging within a team's own workspace.

## Request body

- ToolExecuteInlineRequest
  - `tool_config` union, required — Full tool config to execute inline, before any tool record is persisted.
    - InlinePythonToolConfig — Configuration for an inline Python tool. The "code" field should contain a self-contained executable Python function. Example value of "code" string could be: def add( a: float, b: float, ) -> float: return float(a + b)
      - `logical_id` string, nullable — Unique identifier for the tool
      - `tool_id` string, nullable — Reference to the tool already created in the Workflow System. If not provided, the tool config is assumed to be provided inline here.
      - `name` string, nullable — Name for the tool
      - `description` string, nullable — Human friendly description for the tool (not used by AI)
      - `category` string, nullable — Category for the tool. E.g math, ehr, etc
      - `signature` string, nullable — Docstring or signature for the tool used by AI. If provided and there is a default signature already, it will override the default signature.
      - `args_schema` object, nullable — Schema for the arguments that the tool accepts. This should be a JSON schema dictionary. Information provided here will override any default arguments schema.
      - `static_messages_config` StaticMessagesConfig
        - `static_messages` string[] — List of pre-configured messages from which one will be emitted
        - `static_messages_selection_mode` 'random' | 'sequence'
      - `result_runtime_variable_name` string, nullable — Name of the runtime variable to store the result from this tool call
      - `ignore_content_received_during_llm_tool_call_specification` boolean — If true, any free-text content the LLM returns in the same response as a call to this tool is ignored: not emitted via AssistantResponseEvent, not added to chat history, and not added to the node's structured output. When a response contains multiple tool calls, the text is ignored only if every tool call targets a tool for which this flag is set.
      - `type` 'inline_python' — Type of the tool. Must be 'inline_python'
      - `code` string, nullable — Python code to be executed by the tool. It should define a function with proper signature and descriptions for its parameters.
    - InbuiltFunctionToolConfig — Configuration for an inbuilt function tool. This tool type refers to functions that are already registered in the tools registry. The "tool_id" field must match the ID (decorated with "@tool_id") of a registered tool.
      - `logical_id` string, nullable — Unique identifier for the tool
      - `tool_id` string, nullable — Reference to the tool already created in the Workflow System. If not provided, the tool config is assumed to be provided inline here.
      - `name` string, nullable — Name for the tool
      - `description` string, nullable — Human friendly description for the tool (not used by AI)
      - `category` string, nullable — Category for the tool. E.g math, ehr, etc
      - `signature` string, nullable — Docstring or signature for the tool used by AI. If provided and there is a default signature already, it will override the default signature.
      - `args_schema` object, nullable — Schema for the arguments that the tool accepts. This should be a JSON schema dictionary. Information provided here will override any default arguments schema.
      - `static_messages_config` StaticMessagesConfig
        - `static_messages` string[] — List of pre-configured messages from which one will be emitted
        - `static_messages_selection_mode` 'random' | 'sequence'
      - `result_runtime_variable_name` string, nullable — Name of the runtime variable to store the result from this tool call
      - `ignore_content_received_during_llm_tool_call_specification` boolean — If true, any free-text content the LLM returns in the same response as a call to this tool is ignored: not emitted via AssistantResponseEvent, not added to chat history, and not added to the node's structured output. When a response contains multiple tool calls, the text is ignored only if every tool call targets a tool for which this flag is set.
      - `type` 'inbuilt_function' — Type of the tool. Must be 'inbuilt_function'
      - `configurable_key` string, nullable — Stable key identifying which configurable inbuilt tool this is (e.g. 'call_forward'). None for plain static inbuilt references.
      - `extra_config` object, nullable — Tool-specific user configuration values. Schema is defined per configurable key.
    - ExternalAPIToolConfig — Configuration for an external API tool. This tool type represents an external API endpoint that the LLM can call.
      - `logical_id` string, nullable — Unique identifier for the tool
      - `tool_id` string, nullable — Reference to the tool already created in the Workflow System. If not provided, the tool config is assumed to be provided inline here.
      - `name` string, nullable — Name for the tool
      - `description` string, nullable — Human friendly description for the tool (not used by AI)
      - `category` string, nullable — Category for the tool. E.g math, ehr, etc
      - `signature` string, nullable — Docstring or signature for the tool used by AI. If provided and there is a default signature already, it will override the default signature.
      - `args_schema` object, nullable — Schema for the arguments that the tool accepts. This should be a JSON schema dictionary. Information provided here will override any default arguments schema.
      - `static_messages_config` StaticMessagesConfig
        - `static_messages` string[] — List of pre-configured messages from which one will be emitted
        - `static_messages_selection_mode` 'random' | 'sequence'
      - `result_runtime_variable_name` string, nullable — Name of the runtime variable to store the result from this tool call
      - `ignore_content_received_during_llm_tool_call_specification` boolean — If true, any free-text content the LLM returns in the same response as a call to this tool is ignored: not emitted via AssistantResponseEvent, not added to chat history, and not added to the node's structured output. When a response contains multiple tool calls, the text is ignored only if every tool call targets a tool for which this flag is set.
      - `type` 'external_api' — Type of the tool. Must be 'external_api'
      - `api_endpoint` string, nullable — The endpoint URL of the external API
      - `api_method` 'GET' | 'POST' | 'PUT' | 'DELETE' — Enumeration of HTTP methods for API calls.
      - `api_headers` object — HTTP headers to include with the API request (e.g., authorization, content-type)
      - `api_body` union — The request body payload for the API call. Usually applicable for POST/PUT methods.
        - object
        - string
    - KnowledgeBaseToolConfig — Configuration for a knowledge base tool. This tool type represents a knowledge base endpoint that the LLM can call.
      - `logical_id` string, nullable — Unique identifier for the tool
      - `tool_id` string, nullable — Reference to the tool already created in the Workflow System. If not provided, the tool config is assumed to be provided inline here.
      - `name` string, nullable — Name for the tool
      - `description` string, nullable — Human friendly description for the tool (not used by AI)
      - `category` string, nullable — Category for the tool. E.g math, ehr, etc
      - `signature` string, nullable — Docstring or signature for the tool used by AI. If provided and there is a default signature already, it will override the default signature.
      - `args_schema` object, nullable — Schema for the arguments that the tool accepts. This should be a JSON schema dictionary. Information provided here will override any default arguments schema.
      - `static_messages_config` StaticMessagesConfig
        - `static_messages` string[] — List of pre-configured messages from which one will be emitted
        - `static_messages_selection_mode` 'random' | 'sequence'
      - `result_runtime_variable_name` string, nullable — Name of the runtime variable to store the result from this tool call
      - `ignore_content_received_during_llm_tool_call_specification` boolean — If true, any free-text content the LLM returns in the same response as a call to this tool is ignored: not emitted via AssistantResponseEvent, not added to chat history, and not added to the node's structured output. When a response contains multiple tool calls, the text is ignored only if every tool call targets a tool for which this flag is set.
      - `type` 'knowledge_base' — Type of the tool. Must be 'knowledge_base'
      - `target_knowledge_base_ids` string[] — The IDs of the knowledge bases to query
  - `args` object — Argument values to invoke the tool with, keyed by the tool's parameter names.

## Response `200`

Successful Response

- ToolExecuteResponse
  - `success` boolean, required
  - `result` unknown
  - `error` string, nullable — Clean error message when success is False.
  - `latency_ms` integer, nullable — Wall-clock execution time in milliseconds.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/interactly/apis/interactly-api-3.md) · [All operations](https://skmtc.dev/interactly/apis/interactly-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/interactly/interactly-api-3/revisions/8a48fbe2a9a9/schema)
