---
title: "Create Tool"
method: POST
path: "/v1/tools/"
tags: ["tools"]
---

# Create Tool

`POST /v1/tools/`

Create a new tool

## Request body

- ToolCreate
  - `description` string, nullable — The description of the tool.
  - `tags` string[], nullable — Metadata tags.
  - `source_code` string, required — The source code of the function.
  - `source_type` string — The source type of the function.
  - `json_schema` object, nullable — The JSON schema of the function (auto-generated from source_code if not provided)
  - `args_json_schema` object, nullable — The args JSON schema of the function.
  - `return_char_limit` integer — The maximum number of characters in the response.
  - `pip_requirements` PipRequirement[], nullable — Optional list of pip packages required by this tool.
    - `name` string, required — Name of the pip package.
    - `version` string, nullable — Optional version of the package, following semantic versioning.
  - `npm_requirements` NpmRequirement[], nullable — Optional list of npm packages required by this tool.
    - `name` string, required — Name of the npm package.
    - `version` string, nullable — Optional version of the package, following semantic versioning.
  - `default_requires_approval` boolean, nullable — Whether or not to require approval before executing this tool.

## Response `200`

Successful Response

- Tool — Representation of a tool, which is a function that can be called by the agent. Parameters: id (str): The unique identifier of the tool. name (str): The name of the function. tags (List[str]): Metadata tags. source_code (str): The source code of the function. json_schema (Dict): The JSON schema of the function.
  - `id` string — The human-friendly ID of the Tool
  - `tool_type` 'custom' | 'letta_core' | 'letta_memory_core' | 'letta_multi_agent_core' | 'letta_sleeptime_core' | 'letta_voice_sleeptime_core' | 'letta_builtin' | 'letta_files_core' | 'external_langchain' | 'external_composio' | 'external_mcp'
  - `description` string, nullable — The description of the tool.
  - `source_type` string, nullable — The type of the source code.
  - `name` string, nullable — The name of the function.
  - `tags` string[] — Metadata tags.
  - `source_code` string, nullable — The source code of the function.
  - `json_schema` object, nullable — The JSON schema of the function.
  - `args_json_schema` object, nullable — The args JSON schema of the function.
  - `return_char_limit` integer — The maximum number of characters in the response.
  - `pip_requirements` PipRequirement[], nullable — Optional list of pip packages required by this tool.
    - `name` string, required — Name of the pip package.
    - `version` string, nullable — Optional version of the package, following semantic versioning.
  - `npm_requirements` NpmRequirement[], nullable — Optional list of npm packages required by this tool.
    - `name` string, required — Name of the npm package.
    - `version` string, nullable — Optional version of the package, following semantic versioning.
  - `default_requires_approval` boolean, nullable — Default value for whether or not executing this tool requires approval.
  - `created_by_id` string, nullable — The id of the user that made this Tool.
  - `last_updated_by_id` string, nullable — The id of the user that made this Tool.
  - `metadata_` object, nullable — A dictionary of additional metadata for the tool.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.dev/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/yu-code666/letta-api/revisions/6cec99480c13/schema)
