# plugins.settings.set

Source: https://docs.lightair.app/developers/remote-api/plugins.settings.set

> Changes a plugin's settings, after checking every value fits.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Packages and plugins. Script plugins need the `project.write` permission.

`toggle` settings take true or false, `number` a number, `choice` one of its options, others text. A secret setting is set only by the person, in the Plugins panel.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `package` | `string` | yes | The plugin's package id or name. |
| `values` | `{ [key: string]: any }` | yes | The settings to change. |

## Errors

Not found (-32004) when it isn't installed. Invalid params (-32602) when the package isn't a helper or script, or is PiAir. Invalid params (-32602) without `values`, for an unknown key or a value that doesn't fit. A state error (-32005) for a secret setting, or before the plugin has said what settings it has.

## From an AI agent

The MCP server's `plugins (action: set_settings)` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "plugins.settings.set", "params": { "package": "app.example.counter", "values": { "greeting": "hi" } } }
```

Result:

```json
{}
```

## Related

- [plugins.settings.get](https://docs.lightair.app/developers/remote-api/plugins.settings.get.md)
