Skip to content

Set the cases that test an MCP tool

PUT
/v1/mcp-tools/{id}/cases
curl --request PUT \
--url https://beta-api.plune.ai/v1/mcp-tools/example/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "testCaseIds": [ "6f1c2b3a-0000-4000-8000-0000000000c1" ] }'

Sets the whole set; [] unlinks every case. A person, or a write token without X-Plune-Session; an agent is refused (403 agent_proposes). A case of another project and a case that does not exist are the same 404. The cases stay when a tool or the link goes. Logged as an update of the project.

id
required
string

The tool’s id (GET /v1/mcp-servers/{id}/tools)

Media type application/json
object
testCaseIds
required

The whole set; [] unlinks every case

Array<string>
<= 200 items unique items
Example
{
"testCaseIds": [
"6f1c2b3a-0000-4000-8000-0000000000c1"
]
}

The tool with its cases

Media type application/json
object
id
required
string
projectId
required
string
serverId
required
string
name
required

The tool’s own name, case-sensitive: its identity within the server

string
source
required

How it came into the catalog: snapshot - a snapshot of the server listed it

string
Allowed values: snapshot manual
trust
required

confirmed - the server itself listed it; derived - inferred, not listed

string
Allowed values: confirmed derived
listed
required

The latest snapshot lists it. A tool the server stopped listing stays, with its cases

boolean
lastSeenAt
required

When a snapshot last listed it

string format: date-time
nullable
lastSeenEnvironment
required

Where that snapshot was taken

string
nullable
createdBy
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
coverage
required
object
cases
required

The live cases linked to it, each with its external keys - the tests that run it

Array<object>
object
id
required
string
title
required
string
externalKeys
required
Array<object>

An identifier another tool already uses for this test, so a report can find its case without anyone typing a Plune id. The order of kind is load-bearing: it is the ranking that decides which key wins when several match different cases.

object
kind
required
string
Allowed values: playwright-id path-title allure-history cairn-stable eval-id qase testrail testomat zephyr
value
required
string
<= 1024 characters
Example
{
"id": "6f1c2b3a-0000-4000-8000-000000002459",
"projectId": "u-shop::default",
"serverId": "6f1c2b3a-0000-4000-8000-000000002458",
"name": "get_order",
"source": "snapshot",
"trust": "confirmed",
"listed": true,
"lastSeenAt": "2026-11-13T09:00:00.000Z",
"lastSeenEnvironment": "beta",
"createdBy": "6f1c2b3a-0000-4000-8000-0000000000a2",
"createdAt": "2026-11-13T09:00:00.000Z",
"updatedAt": "2026-11-13T09:00:00.000Z",
"coverage": {
"cases": [
{
"id": "6f1c2b3a-0000-4000-8000-0000000000c1",
"title": "Read an order",
"externalKeys": [
{
"kind": "playwright-id",
"value": "orders.spec.ts:3"
}
]
}
]
}
}

Invalid JSON or body

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

A reader, a read token, or an agent (agent_proposes: the catalog is not written by an agent yet)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No such tool in your project, or a case that is not one of its live cases

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over