Skip to main content
POST
/
tools

Endpoint

POST https://gateway.orkeia.ai/tools Authentication
Requires header authorization: <your_token>.

Request Body (JSON)

The service expects a wrapper with the property tool. (The environment is handled on the server.)
Note: the field type does not exist in this interface. Use the fields defined in Tool (below).
{
  "tool": {
    "name": "My Tool",
    "description": "Tool description",
    "code": "export async function run(input){ return { ok: true }; }",
    "entryFunctionName": "run",
    "sectors": ["engineering", "legal"],
    "publisher": "Orkeia",
    "enabled": true,
    "environments": ["prod"],
    "mcp": {
      "url": "https://tools.orkeia.ai/my-tool",
      "transport": "sse"
    }
  }
}

Example (cURL)

curl -X POST "https://gateway.orkeia.ai/tools"   -H "authorization:  <your_token>"   -H "Content-Type: application/json"   -d '{
    "tool": {
      "name": "My Tool",
      "description": "Tool description",
      "code": "export async function run(input){ return { ok: true }; }",
      "entryFunctionName": "run",
      "sectors": ["engineering", "legal"],
      "publisher": "Orkeia",
      "enabled": true,
      "environments": ["prod"],
      "mcp": {
        "url": "https://tools.orkeia.ai/my-tool",
        "transport": "sse"
      }
    }
  }'

Responses

Response - Success

response
{
  "status": "OK",
  "data": { "id": "TOOL_123456" }
}

500 — Server Error

{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}

400 — Client Error

{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}

Reference Interface (Tool)

export interface Tool {
  id?: string;
  name: string;
  description: string;
  code?: string;
  entryFunctionName?: string;
  sectors: string[];
  publisher: string;
  enabled: boolean;
  environments: string[];
  mcp?: {
    url: string;
    transport: 'sse' | 'streamable-http';
  };
}

Fields

NameTypeRequiredDescriptionExample
idstringNoUnique identifier (returned by the backend).TOOL_123456
namestringYesName of the tool.My Tool
descriptionstringYesShort description of the functionality.Performs integration operations
codestringNoExecutable source code of the tool (when applicable).export async function run(){...}
entryFunctionNamestringNoName of the exported function in code that will be invoked.run
sectorsstring[]YesAuthorized sectors to use the tool.["engineering","legal"]
publisherstringYesPublisher/organization responsible.Orkeia
enabledbooleanYesIndicates if the tool is enabled.true
environmentsstring[]YesEnvironments in which the tool is available.["prod","staging"]
mcpobjectNoConfiguration for use via Model Context Protocol (MCP).{ "url": "...", "transport": "sse" }
mcp.urlstringNoURL of the MCP server.https://tools.orkeia.ai/my-tool
mcp.transport'sse' | 'streamable-http'NoSupported MCP transport type.sse