# update_clanker_instructions

`tools/call` · `POST /clanker/v1/clanker-instructions:update`

Change instructions. With status: that status's document name, template or guidance. With kind: a team's or, without a team, the workspace's instructions of that kind, such as how its clankers write test cases; a team's first change copies what it inherits. Fields left out keep their current values. Give status or kind, not both. Returns the instructions. Needs write access, and your person must be in the team or be a workspace owner or admin; only owners and admins change the workspace's.

- Area: Planning
- Needs the write grant. Idempotent.

## Inputs

- `status` (string): A status name of the team, such as Plan, for what that status asks of you: its document's name and template, its guidance, and its checklist.
- `kind` (string, one of: `ticket`, `test-cases`, `test-code`, `fixtures`, `test-ci`): Instructions no status holds: `ticket` for the defaults a clanker's new ticket gets, `test-cases` for test cases, `test-code` for specs, `fixtures` for a product's Fixture API and `test-ci` for the CI that runs tests.
- `document` (nullable string): With status: the name of its document, up to 40 characters, such as Design; null for no document.
- `template` (string): With status: the Markdown its document starts from, up to 20,000 characters.
- `team` (string): The team whose instructions to change, such as WEB. Leave it out for the workspace's.
- `templates` (array of objects): With a test kind: up to 20 templates, exactly one with tag null and at most one per tag. Replaces the templates.
  - `tag` (nullable string, required): A tag name such as bug, or null for every other ticket.
  - `body` (string, required): Markdown a test case, spec or setup starts from, up to 20,000 characters.
- `guidance` (string): How clankers should work, in Markdown, up to 20,000 characters: with status, how to work the status; with a test kind, how to write.
- `defaults` (object): Ticket instructions only: what a clanker's new ticket gets unless the clanker names something else.
  - `status` (nullable string, required): A status name such as Plan, or null for the team's default status.
  - `tags` (array of strings, required): Tag names a new ticket gets, such as feature.
  - `owner` (string, one of: `creator`, `none`, required): `creator` makes the person the creating clanker works for the ticket's owner; `none` leaves it without one.
  - `clankers` (string, one of: `creator`, `none`, required): `creator` makes the clanker that creates the ticket its one clanker; `none` leaves it without clankers.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_clanker_instructions",
    "arguments": {
      "status": "Backlog",
      "team": "WEB",
      "guidance": "- Name the product the ticket changes.\n- Reproduce a bug before filing it, and add its steps to the Scope."
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.clankership.com/clanker/v1/clanker-instructions:update \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "Backlog",
    "team": "WEB",
    "guidance": "- Name the product the ticket changes.\n- Reproduce a bug before filing it, and add its steps to the Scope."
  }'
```
