Tools

Create tool

Define a new action for agents.

POSThttps://app.elunos.ai/api/v1/spaces/{space}/tools

Creates a tool. It is then available in the space, but is only used once you attach it to an agent and publish that agent.

Path parameters

spacestringPflicht

Slug of the space, e.g. `praxis-mueller`. Returned by `GET /spaces`.

Body

connection_iduuidPflicht

The [connection](/docs/api-reference/list-connections) the tool calls through.

slugstringPflicht

Machine name, e.g. `find_slots`. Lowercase letters, digits and underscores, unique in the space.

namestringPflicht

Display name.

descriptionstringPflicht

When the agent should use the tool. Write it for the agent, not for people: what it does, when to use it, what it does not do.

recipeobjectPflicht

What the tool calls and what it returns, see [Recipes](/docs/api-reference/recipes).

Example

curl -X POST https://app.elunos.ai/api/v1/spaces/praxis-mueller/tools \
  -H "Authorization: Bearer np_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "connection_id": "0199a3c3-5b6c-7a02-b4d1-9e8f7a6c5d32",
    "slug": "find_slots",
    "name": "Freie Termine suchen",
    "description": "Sucht freie Termine an einem Tag. Nutze es, bevor du einen Termin vorschlägst.",
    "recipe": {
      "kind": "fetch",
      "announce": true,
      "announce_text": "Einen Moment, ich schaue nach freien Terminen.",
      "sources": {
        "a": {
          "method": "GET",
          "url": "/slots?date={{date}}",
          "params": [
            {
              "from": "llm",
              "name": "date",
              "value": "Wunschtag des Anrufers im Format YYYY-MM-DD",
              "type": "string",
              "required": true
            }
          ]
        }
      },
      "output": {
        "fields": [
          "slots"
        ],
        "limit": 5,
        "remember": []
      }
    }
  }'

Response

201 with the new tool.

{
  "data": {
    "id": "0199a3c4-1f2a-7c55-8e10-6b7d9a3e2f11",
    "slug": "find_slots",
    "sync_status": "synced",
    "…": "…"
  }
}