---
title: "Set persistent tool state"
method: PUT
path: "/tools/{toolId}/state"
tags: ["Tools"]
---

# Set persistent tool state

`PUT /tools/{toolId}/state`

## Request

- Base URL: `https://api.superglue.cloud/v1`
- URL: `https://api.superglue.cloud/v1/tools/{toolId}/state`
- Auth: HTTP bearer

Replaces the tool's persistent state with the provided object, subject to the same key and size limits as run-time state writes. Keys changed by a concurrent run between read and write are reported as warnings. State is unencrypted; never store credentials in it.

## Path parameters

- `toolId` string, required

## Request body

- object
  - `state` object, required: The full replacement state. Values must be JSON-serializable, up to 100 keys and 64 KB per value.

## Response `200`

State replaced

- object
  - `toolId` string, required
  - `warnings` string[], required

## Other responses

- `400`: State is not a plain object or exceeds limits
- `403`: Not authorized to modify this tool
- `404`: Tool not found

---

[API](https://skmtc.dev/superglue/apis/superglue-api.md) - [All operations](https://skmtc.dev/superglue/apis/superglue-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superglue/apis/superglue-api/revisions/2d412a94bf09?raw)
