Skip to main content
Glama

Add knowledge

add_knowledge

Saves 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

NameRequiredDescriptionDefault
bodyYesThe entry itself, in Markdown. Headings split it into the passages a search finds, so give each topic its own heading.
kindYesWhat 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).
titleYesA short title that says what the entry is about.
applies_toNoWhat 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_idNoThe project (list_projects gives ids). Leave it out to use the workspace's own knowledge, shared by every project in it.
workspace_idNoWorkspace id from whoami; omit when there is one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / applies_to
      Added value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "id": {
      +          "description": "The part's or service's id (get_project_brief's topology lists them), or the area.",
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "kind": {
      +          "description": "component: one part of the project; resource: one service it uses; area: frontend, backend, data_storage, auth_access, infrastructure, integrations, observability, security, docs or tooling.",
      +          "enum": [
      +            "component",
      +            "resource",
      +            "area"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "id"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "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."
      +}
    • changedInput schema / properties / kind / description
      Previous value: -"What the entry is, such as note, decision, glossary, faq, brand-voice or style-guide (list_knowledge_kinds gives every kind and when to use it)."New value: +"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)."
  2. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare non-read-only, non-destructive, closed-world. The description adds real behavior beyond that: authorship ('saved as the assistant's, for the person'), immediate effect with an unconfirmed status pending confirm_knowledge, an immutability constraint on platform guidance, and the return shape (new id and version 1). That is substantially richer than the annotations, though failure/permission behavior is not covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with what the tool does, followed by lifecycle and constraint details. Each clause carries information, though the middle sentence packs attribution, timing, and confirmation state tightly enough to be slightly dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter write tool with no output schema, the description covers purpose, scoping defaults, provenance, lifecycle state, the confirmation follow-up, and the returned id/version. Only edge cases such as permission errors or what happens on an invalid kind are left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: omitting project_id scopes the entry to the entire workspace, and applying to an area works at workspace level. These are semantic consequences, not restatements of field docs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Saves a new knowledge entry') and states the scope alternatives (project vs. whole workspace when project_id is omitted). It distinguishes itself from confirm_knowledge explicitly and implies the new-vs-existing boundary against update_knowledge, though the explicit contrast only appears inside the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for use (so CodeGene's agents and the person's assistants can use it) and identifies the follow-up step confirm_knowledge, plus a hard exclusion: platform guidance cannot be changed. It does not explicitly say when to reach for update_knowledge instead of adding a duplicate entry.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources