brain_brain_query
Primary tool for pattern-based operations on TheBrain. Requires npub for credit billing.
Accepts BrainQuery (BQL) -- a Cypher subset supporting MATCH, WHERE, CREATE, SET, MERGE, DELETE, and RETURN.
⚠️ Name-based matching (MATCH by name, WHERE CONTAINS/STARTS WITH/=~) resolves through the vendor's search/name index, which is incomplete on large brains (TheBrainTech/thebrain-api-quickstart-python#1): a query may fail to match a thought that provably exists. An empty match set is NOT proof of absence — do not CREATE/MERGE a node on the assumption it is missing without an ID-based check (get_thought). Matching by ID is reliable; matching by name inherits the index's blind spots.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| npub | No | Required. Your Nostr public key (npub1...) for credit billing. | |
| query | Yes | A BrainQuery string (Cypher subset). | |
| confirm | No | Set to true to confirm and execute a DELETE operation. | |
| brain_id | No | The ID of the brain (uses active brain if not specified) | |
| dpop_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||