Add knowledge
add_knowledgeSaves a new knowledge entry for a project, or for the whole workspace when project_id is left out, so CodeGene's agents (Gene, the Builders) and the person's assistants can use it. It is saved as the assistant's, for the person, and is used at once but reads unconfirmed until the person confirms it (confirm_knowledge). CodeGene's platform guidance cannot be changed. The answer gives the new entry's id and version 1.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"kind": "<kind>",
"title": "<title>",
"body": "<body>"
},
"name": "add_knowledge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | The entry itself, in Markdown. Headings split it into the passages a search finds, so give each topic its own heading. | |
| kind | Yes | What the entry is, such as note, decision, house-rule, glossary, faq, brand-voice or style-guide (list_knowledge_kinds gives every kind and when to use it). | |
| title | Yes | A short title that says what the entry is about. | |
| applies_to | No | What part of the project the entry is about, such as a house rule for the shop pages only. A part or service needs project_id; an area works for the workspace too. null: the whole project (or every project). Left out on update_knowledge, the entry keeps what it had. | |
| project_id | No | The project (list_projects gives ids). Leave it out to use the workspace's own knowledge, shared by every project in it. | |
| workspace_id | No | Workspace id from whoami; omit when there is one. |