brain.add
Add one thing Selda should know: a product, a partner, a reference, a company fact, a note, something it must never say, or a
writing_rule— a standing instruction about HOW messages are written, which reaches the composer as a directive and is never quoted as material.
| Endpoint | POST /mcp/mutate |
| Scope | write |
| Sandbox key | allowed |
| Extra entitlement | none |
| MCP tools | selda_add_brain_item |
| Convex function | mcpQueries:addBrainItemInternal |
A free sandbox key may call it.
Arguments
| Argument | Type | Required | Notes |
|---|---|---|---|
projectId | id<"projects"> | required | |
type | "company" | "product" | "partner" | "reference" | "avoid" | ... | required | |
title | string | required | |
body | string | required |
Shapes that did not fit the table:
type: "company" | "product" | "partner" | "reference" | "avoid" | "note" | "writing_rule"What Selda fills in
You never send these. The HTTP layer overwrites them from the API key, which is what keeps one organisation’s data out of another’s reach.
| Argument | Filled in from |
|---|---|
orgId | your organisation, resolved from the API key |
Example request
Required arguments only. Values in angle brackets are yours to fill in; the optional ones are in the table above.
curl -X POST https://api.selda.ai/mcp/mutate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{ "fn": "brain.add", "args": { "projectId": "<projectId>", "type": "company", "title": "<title>", "body": "<body>" } }'{
"fn": "brain.add",
"args": {
"projectId": "<projectId>",
"type": "company",
"title": "<title>",
"body": "<body>"
}
}Example response
Every endpoint answers in the same envelope.
{
"value": <the function's return value>,
"request_id": "req_..."
}The shape of value is not documented here. mcpQueries:addBrainItemInternal declares no returns validator, so there is nothing to derive it from, and a shape written out by hand here is a shape that goes stale without anything noticing. Call it once against a test key and read what comes back.
On failure the body is { "error": { "type", "code", "message", "request_id" }, "request_id" } and request_id is echoed in the X-Request-Id header.
Generated from convex/lib/mcpRegistry.ts. Nothing in this reference sends: launchRun is in no
registry and never will be, so a script can prepare a campaign completely and a person still
presses send in the app.