# Register a tenant tool (or a new version of one) on the platform's project

`POST /platform-agents/tools` · Rivier · agents

Register a tenant tool (or a new version of one) on the platform's project: a name, a description for the model, input and output schemas (the part of JSON Schema Rivier checks), a tier (read, change, approval), what may be kept (none, session), the scope a session needs (read, act) and the https address Rivier calls, signed as webhooks are with the secret shown once. A tool that fails ten times in a row is switched off.

- Scope: agents:admin
- Graphql: Mutation.agentsPlatformToolCreate
- Sdk: agents.platformTool.create
- Cli: agents platform tool create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,47}$"
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "input": {
      "type": "object",
      "additionalProperties": {}
    },
    "output": {
      "type": "object",
      "additionalProperties": {}
    },
    "tier": {
      "type": "string",
      "enum": [
        "read",
        "change",
        "approval"
      ],
      "default": "approval"
    },
    "retain": {
      "type": "string",
      "enum": [
        "none",
        "session"
      ],
      "default": "none"
    },
    "scope": {
      "type": "string",
      "enum": [
        "read",
        "act"
      ],
      "default": "act"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 500
    }
  },
  "required": [
    "name",
    "description",
    "input",
    "output",
    "url"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/platform-agents/tools' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "input": {},
  "output": {},
  "url": "https://example.com"
}'
```
