API v1
v1
View as Markdown

List MCP calls

GET /api/v1/mcp-calls

List the calls assistants made to your account through MCP, newest first.

The account log records what changed. This records what was asked: every tool call, whether it read, changed, was refused, was given wrong parameters or failed. A call made with no valid key is never attributed to an account, so it never appears here.

Calls are kept for 90 days by default, a period the instance sets, and then removed. Nothing here can be written, changed or removed through the API.

This endpoint also answers QUERY, with the same parameters sent in the request body. How QUERY works.

Query parameters

Sent as JSON. Anything not listed here is ignored.

period string Optional default: all

How far back to look: day for the last 24 hours, week for the last 7 days, month for the last 30 days, or all for everything still kept. Any other value answers 422.

connection string Optional

Only the calls of one connection, written as its type and its id joined by a colon, such as api_key:14 or oauth_client:9a1f4c2e-7b3d-4f8a-a6e1-3c5d9b2e7f14.

result string Optional

Only the calls with one result: succeeded, refused, invalid_parameters, error or interrupted. Any other value answers 422.

tool string Optional

Only the calls to one tool, by its name, such as get-contact.

page integer Optional default: 1

Which page to answer with.

per_page integer Optional default: 25

How many calls one page holds, between 1 and 100. A number outside the range is brought back into it rather than refused.

Returns

A page of calls, and how many there are in all.

data array

The calls on this page. An empty list rather than an error when there are none.

data[] object

One call.

data[].type string

Always mcp_call. It names the kind of record, so a caller holding several kinds can tell them apart without looking at where they came from.

data[].id string

The id of this record, as a string even when it reads as a number. It is what every endpoint naming this record takes.

data[].attributes object

Everything the record holds.

data[].attributes.started_at_in_milliseconds integer

When the call started, as a count of milliseconds since 1970. Milliseconds rather than seconds, because an assistant often makes several calls within the same second.

data[].attributes.duration_in_milliseconds integer

How long the tool took, or null while the call is interrupted.

data[].attributes.connection object

What the assistant connected with.

data[].attributes.connection.type string

api_key for an API key, oauth_client for an assistant connected through OAuth.

data[].attributes.connection.id string

The id of the key or of the OAuth client. It stays after the key is revoked or the assistant disconnected.

data[].attributes.connection.name string

The name the connection had when the call was made. It is the name you or the assistant chose, not a verified identity of whoever made the assistant.

data[].attributes.tool string

The name of the tool, as the assistant sent it, such as get-contact.

data[].attributes.operation string

read, create, update or delete, taken from the API endpoint the tool mirrors. Null for a tool that does not exist.

data[].attributes.vault object

The vault the call reached, or null when it named none inside your account.

data[].attributes.vault.id uuid

The id of the vault, or null once the vault is deleted.

data[].attributes.vault.name string

The name the vault had when the call was made.

data[].attributes.subject object

The record the call reached, or null when it reached none inside your account.

data[].attributes.subject.type string

What kind of record it is, such as contact or life_event.

data[].attributes.subject.label string

The name the record had when the call was made.

data[].attributes.result string

succeeded, refused, invalid_parameters, error or interrupted. It is read from what the tool answered, never from the HTTP status, which is 200 for a failed tool call too. A call that started and never finished stays interrupted.

data[].attributes.error object

Why the call did not succeed, or null when it did.

data[].attributes.error.code integer

The JSON-RPC code: -32602 when the parameters or the record were refused, -32603 for anything else.

data[].attributes.error.message string

The reason sent to the assistant, word for word.

data[].attributes.json_rpc_id string

The id the assistant gave the request, as a string.

data[].attributes.ip_address string

The address the request came from, up to 45 characters.

data[].attributes.parameters string

The parameters the assistant sent, as JSON, with secrets and the values of sensitive fields masked before they were stored.

data[].attributes.parameters_truncated boolean

Whether the parameters were longer than 16 384 bytes and only their beginning was kept, in which case parameters is not valid JSON.

data[].attributes.response string

The response the assistant received, as JSON, masked the same way, or null when the call ended in a JSON-RPC error.

data[].attributes.response_truncated boolean

Whether the response was cut the same way.

data[].links object

Where to find this record.

data[].links.self string

The absolute address this record is read from.

meta object

Where you are in the collection.

meta.page integer

The page this is, counting from 1.

meta.per_page integer

How many one page holds, which is the size that was asked for once it has been brought into the allowed range.

meta.total integer

How many calls there are in all, not how many are on this page.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

GET
curl https://my.monicahq.com/api/v1/mcp-calls \
-H "Authorization: Bearer $MONICA_TOKEN"
const response = await fetch('https://my.monicahq.com/api/v1/mcp-calls', {
headers: { Authorization: `Bearer ${token}` },
})
const data = await response.json()
$response = Http::withToken($token)->get('https://my.monicahq.com/api/v1/mcp-calls');
Response 200
{
"data": [
{
"type": "mcp_call",
"id": "5b1f0e9c-2d4a-4c7e-8b36-1a9e7d2c4f03",
"attributes": {
"started_at_in_milliseconds": 1792765991204,
"duration_in_milliseconds": 21,
"connection": {
"type": "oauth_client",
"id": "9a1f4c2e-7b3d-4f8a-a6e1-3c5d9b2e7f14",
"name": "Claude"
},
"tool": "update-life-event",
"operation": "update",
"vault": {
"id": "0f7e2c1a-6b3d-4e59-8a21-5c9d3b7e1f60",
"name": "Dunder Mifflin"
},
"subject": {
"type": "life_event",
"label": "Dundies"
},
"result": "invalid_parameters",
"error": {
"code": -32602,
"message": "The happened on field must match the format Y-m-d."
},
"json_rpc_id": "8",
"ip_address": "192.168.1.24",
"parameters": "{\"vault\":\"dunder-mifflin\",\"life_event\":\"7c2e9a14-3b5d-4f61-8e27-9d1a4c6b2f85\",\"happened_on\":\"31/02/1978\"}",
"parameters_truncated": false,
"response": "{\"content\":[{\"type\":\"text\",\"text\":\"The happened on field must match the format Y-m-d.\"}],\"isError\":true}",
"response_truncated": false
},
"links": {
"self": "https://my.monicahq.com/api/v1/mcp-calls/5b1f0e9c-2d4a-4c7e-8b36-1a9e7d2c4f03"
}
},
{
"type": "mcp_call",
"id": "9d3c6a52-4a8e-4f6b-9f1e-2b7c1d0e5a41",
"attributes": {
"started_at_in_milliseconds": 1792765927412,
"duration_in_milliseconds": 58,
"connection": {
"type": "api_key",
"id": "14",
"name": "Dundie awards bot"
},
"tool": "get-contact",
"operation": "read",
"vault": {
"id": "0f7e2c1a-6b3d-4e59-8a21-5c9d3b7e1f60",
"name": "Dunder Mifflin"
},
"subject": {
"type": "contact",
"label": "Dwight Schrute"
},
"result": "succeeded",
"error": null,
"json_rpc_id": "7",
"ip_address": "192.168.1.24",
"parameters": "{\"vault\":\"dunder-mifflin\",\"contact\":\"dwight-schrute\"}",
"parameters_truncated": false,
"response": "{\"content\":[{\"type\":\"text\",\"text\":\"{\\\"name\\\":\\\"Dwight Schrute\\\"}\"}],\"isError\":false}",
"response_truncated": false
},
"links": {
"self": "https://my.monicahq.com/api/v1/mcp-calls/9d3c6a52-4a8e-4f6b-9f1e-2b7c1d0e5a41"
}
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 2
}
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.