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

# Room Toolkits REST API

> Discover and invoke deployed room toolkit tools over HTTP.

Use the MeshAgent API base URL to discover enabled toolkit services available in a room and invoke a tool by name. These endpoints work while the room is stopped. A tool can start room compute by calling the [Datasets or SQLite REST API](https://docs.meshagent.com/rest_api/room_data.md).

Send a [room participant token](https://docs.meshagent.com/rest_api/participant_tokens.md) for the target project and room in `Authorization: Bearer <token>`. Its API grant needs `agents.use_tools`. If `agents.allowed_toolkits` is present, the name must be in that list. The [CLI walkthrough](https://docs.meshagent.com/services/deployment/room_toolkits.md#test-with-the-cli) uses the CLI's signed-in session to obtain this token.

| Request | Success response |
| - | - |
| `GET /projects/{project_id}/rooms/{room_name}/toolkits` | A JSON `toolkits` array. Each entry has a name, description, and a list of tools with their `input_schema`. |
| `POST /projects/{project_id}/rooms/{room_name}/toolkits/{toolkit}/tools/{tool}` | The tool's JSON result. Send a JSON object matching the tool's input schema. |

The toolkit path segment is the service's `metadata.name`. The tool path segment is the tool's `name`. URL-encode each path segment.

```bash theme={null}
TOOLKITS_URL="$MESHAGENT_API_URL/projects/$PROJECT_ID/rooms/$ROOM_NAME/toolkits"
curl --fail-with-body -H "Authorization: Bearer $PARTICIPANT_TOKEN" "$TOOLKITS_URL"

curl --fail-with-body \
  -H "Authorization: Bearer $PARTICIPANT_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"message":"hello"}' \
  "$TOOLKITS_URL/room-helpers/tools/echo"
```

The example invokes the `echo` tool from the [Python toolkit service example](https://docs.meshagent.com/services/deployment/deploy_services.md#example-4-service-with-a-python-toolkit).

## Errors and telemetry

Invalid arguments return HTTP 400, and a missing toolkit or tool returns 404. A denied invocation or a script that raises `PermissionError` returns HTTP 403 with `error.code` set to `permission_denied`. If a project and a room both have enabled toolkits with the same name, requests for that toolkit return HTTP 409.

Invocations are recorded as service telemetry. Use the service deployment ID for the `logs`, `traces`, and `metrics` endpoints. For a room service, use `GET /accounts/projects/{project_id}/rooms/{room_name}/services/{service_id}/telemetry/{signal}`. For a project service, use `GET /accounts/projects/{project_id}/services/{service_id}/telemetry/{signal}`. See [service telemetry](https://docs.meshagent.com/services/deployment/deploy_services.md#view-service-telemetry).


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