> ## Documentation Index
> Fetch the complete documentation index at: https://docs.threetone.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Code tools

> Prepare functions for future tool integration while hosted code execution remains planned.

A code tool would run a function as part of an agent action. Threetone does not currently document a released hosted-code tool type, function-upload workflow, or execution sandbox.

<Note>
  Do not add an invented `type: "code"` tool definition or assume a language runtime, package installer, filesystem, or network environment is available. Existing client and webhook tool definitions are different interfaces.
</Note>

## Prepare a function contract

You can make future integration easier by writing a small function with explicit inputs and a reviewable result. For example, a delivery-window formatter might accept a date range and a time zone and return a display string.

| Decision | What to record |
| - | - |
| Inputs | Required fields, accepted types, and validation rules. |
| Output | A small result object and the meaning of each field. |
| Failure | Invalid input, unavailable dependencies, and timeouts. |
| Side effects | Whether the function reads data, changes data, or only computes a result. |
| Ownership | The application or service responsible for authorization and execution. |

## Choose an existing configuration path

<Steps>
  <Step title="Use a client definition for interface actions">
    Prepare a [client tool](/agents-platform/configure/tools/client-tools) when the intended action belongs in your application's interface. The definition does not provide the handler or release its runtime integration.
  </Step>

  <Step title="Use an HTTP contract for server actions">
    If you already operate an authorized service, prepare a [webhook tool](/agents-platform/configure/tools/webhook-tools) describing its endpoint. Keep code, dependencies, credentials, and access checks in that service.
  </Step>

  <Step title="Test your function independently">
    Use synthetic inputs to check the function in your own environment. Record those results separately from Threetone integration testing; local success does not prove agent-tool execution.
  </Step>
</Steps>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can I paste Python or JavaScript into a tool?" id="faq-code-tools-paste">
    There is no verified hosted-code submission workflow in this guide. Pasting code into a description stores text; it does not run that code.
  </Accordion>

  <Accordion title="Does a webhook tool host my function?" id="faq-code-tools-hosting">
    No. It describes an HTTP request. You operate the receiving service and its code separately, and live tool execution still needs verification.
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.