Skip to main content
Glama

Knowledge Base

infobroker_manage_kb
Destructive

Search, ingest, list, retrieve, or delete cached knowledge base entries, view stats and claims, and manage at-rest encryption for archived reports and stored content.

Instructions

Manage the local knowledge base: search cached content, ingest text or URLs, list/get/delete entries, view stats, read persisted claim records, and manage at-rest encryption. Use when you need to archive a generated report (ingest with source_type 'report' and save_to 'kb'), revisit stored content, or manage encryption keys. Do NOT use for fresh external search (use infobroker_search_web) or to fetch a new page (use infobroker_fetch_page). The delete action is destructive and cannot be undone; a lost encryption key makes the store unrecoverable by design. Parameter semantics: action selects the operation; query for search, text/url plus title and collection for ingest, source_url for get/delete, and operation with key_file for the encryption sub-actions; source_type and freshness_tier tag an ingest and filter search/list; save_to defaults to 'kb', format to 'markdown', max_results to 8; last_updated is auto-detected from fetched URLs when omitted; receipt attaches a claim-to-source manifest to a report ingest and verify_report rechecks it offline. Responses carry an [OK] or [ERROR] envelope: search/list/get return entries, stats returns counts, delete reports the chunks removed.

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": {
      "action": "<action>"
    },
    "name": "infobroker_manage_kb"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoURL to fetch and index (for ingest action)
textNoRaw text to index (for ingest action)
queryNoSearch query (search action) or claim-text filter (claims action)
titleNoDocument/report title
actionYesOperation to perform
formatNoFile format for disk savemarkdown
receiptNoOptional verification receipt for a report ingest (REQ-110): claims with cited sources, report-level Source Register URLs, and optional report metadata (REQ-114). The server computes the report hash, per-source hashes, and the digest; any caller hashes or digest are ignored. Requires source_type 'report' and KB storage.
save_toNoWhere to save (ingest action): kb, disk, or both. Default kb
key_fileNoPath to a key file (generate_key writes here and refuses an existing path; rekey reads the target key from here). Never pass the secret itself — only a file path.
operationNoSub-operation for the 'encryption' action
collectionNoCollection name
source_urlNoSource URL filter (get/delete/claims action), the report identity for verify_report, or identity for ingest
max_resultsNoMaximum results to return (search/claims action; 1-50, default 8)
source_typeNoSource type (tag on ingest; filter on search/list)
last_updatedNoSource last-updated date to store (e.g. '2026-08-24'); auto-detected from fetched URLs when omitted
freshness_tierNoFreshness tier tag on ingest (e.g. 'report', 'evergreen')

Output Schema

NameRequiredDescriptionDefault
metaNo
errorNo
statusYes
noticesNo
resultsNo
providerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2026.10.30
    • changedInput schema / properties / receipt / description
      Previous value: -"Optional verification receipt for a report ingest (REQ-110): claims with cited sources and optional report metadata (REQ-114). The server computes the report hash, per-source hashes, and the digest; any caller hashes or digest are ignored. Requires source_type 'report' and KB storage."New value: +"Optional verification receipt for a report ingest (REQ-110): claims with cited sources, report-level Source Register URLs, and optional report metadata (REQ-114). The server computes the report hash, per-source hashes, and the digest; any caller hashes or digest are ignored. Requires source_type 'report' and KB storage."
    • addedInput schema / properties / receipt / properties / sources
      Added value: +{
      +  "description": "Report-level Source Register URLs, linked to the stored report (REQ-110)",
      +  "items": {
      +    "properties": {
      +      "retrieved_at": {
      +        "type": "string"
      +      },
      +      "snippet": {
      +        "maxLength": 2000,
      +        "type": "string"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "type": "array"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "error": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "remediation": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "notices": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "enum": [
      +        "ok",
      +        "error"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "provider"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv2026.10.29
    • changedInput schema / properties / key_file / description
      Previous value: -"Path to a key file (generate_key writes here; rekey reads the target key from here). Never pass the secret itself — only a file path."New value: +"Path to a key file (generate_key writes here and refuses an existing path; rekey reads the target key from here). Never pass the secret itself — only a file path."
  3. Changed5 schema fields changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "search",
      -  "ingest",
      -  "list",
      -  "get",
      -  "stats",
      -  "delete",
      -  "encryption"
      -]New value: +[
      +  "search",
      +  "ingest",
      +  "list",
      +  "get",
      +  "stats",
      +  "delete",
      +  "encryption",
      +  "claims",
      +  "verify_report"
      +]
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum results to return (1-50, default 8)"New value: +"Maximum results to return (search/claims action; 1-50, default 8)"
    • changedInput schema / properties / query / description
      Previous value: -"Search query (for search action)"New value: +"Search query (search action) or claim-text filter (claims action)"
    • addedInput schema / properties / receipt
      Added value: +{
      +  "description": "Optional verification receipt for a report ingest (REQ-110): claims with cited sources and optional report metadata (REQ-114). The server computes the report hash, per-source hashes, and the digest; any caller hashes or digest are ignored. Requires source_type 'report' and KB storage.",
      +  "properties": {
      +    "claims": {
      +      "items": {
      +        "properties": {
      +          "claim": {
      +            "type": "string"
      +          },
      +          "confidence": {
      +            "description": "Report-level confidence for this claim",
      +            "enum": [
      +              "High",
      +              "Medium",
      +              "Low"
      +            ],
      +            "type": "string"
      +          },
      +          "grade": {
      +            "type": "string"
      +          },
      +          "likelihood": {
      +            "description": "Calibrated likelihood term (for example almost certain, likely, even chance, unlikely)",
      +            "type": "string"
      +          },
      +          "sources": {
      +            "items": {
      +              "properties": {
      +                "retrieved_at": {
      +                  "type": "string"
      +                },
      +                "snippet": {
      +                  "maxLength": 2000,
      +                  "type": "string"
      +                },
      +                "title": {
      +                  "type": "string"
      +                },
      +                "url": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "url"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "verdict": {
      +            "description": "Fact-check verdict for this claim (for example True, Mostly True, Half True, Mostly False, False, Misleading, Unverifiable)",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "claim"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "report": {
      +      "description": "Optional report-level manifest metadata (REQ-114), stored with the receipt",
      +      "properties": {
      +        "alternatives": {
      +          "description": "Alternative hypotheses or options considered",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "assumptions": {
      +          "description": "Key assumptions stated separately from evidence",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "audience": {
      +          "description": "Target audience profile",
      +          "type": "string"
      +        },
      +        "gaps": {
      +          "description": "Questions left open",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "methodology": {
      +          "description": "Methodology and scope summary",
      +          "type": "string"
      +        },
      +        "revision": {
      +          "description": "Report revision number",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "shape": {
      +          "description": "Workflow shape that produced the report",
      +          "type": "string"
      +        },
      +        "supersedes": {
      +          "description": "Report identity this revision supersedes",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / source_url / description
      Previous value: -"Source URL filter (get/delete action) or identity for ingest"New value: +"Source URL filter (get/delete/claims action), the report identity for verify_report, or identity for ingest"
  4. Addedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint and non-idempotency, but the description adds the consequences an agent cannot infer: delete is irreversible, and a lost encryption key makes the store unrecoverable by design. It also discloses the [OK]/[ERROR] response envelope and per-action return shapes, which is meaningful behavior beyond the structured fields.

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?

Front-loaded with purpose, then exclusions, then parameter semantics, then response format — a sensible escalation for a 9-action tool. It is dense for a description, and a whole clause repeating schema defaults could be cut, but almost every sentence carries routing or behavioral information.

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 high-complexity, 16-parameter, enum-heavy tool with a nested receipt object, the description covers action routing, destructive caveats, and return envelopes; a separate output schema means return values need not be detailed further. Minor gaps remain around the encryption sub-operations (status/verify/backup/rekey differences) and what the claims action actually returns.

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; the description earns above that by mapping each action to its relevant parameters (query for search, text/url+title+collection for ingest, source_url for get/delete, operation+key_file for encryption) and explaining that last_updated is auto-detected and receipt/verify_report pair together. It also restates defaults already in the schema (kb, markdown, 8), which is redundant rather than additive.

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

Purpose5/5

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

Opens with a specific verb+resource ('Manage the local knowledge base') and enumerates the concrete operations: search, ingest, list/get/delete, stats, claims, encryption. It explicitly names the two sibling tools it is not (infobroker_search_web, infobroker_fetch_page), so an agent can disambiguate without opening any schema.

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

Usage Guidelines5/5

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

Gives positive triggers ('archive a generated report with source_type report and save_to kb', 'revisit stored content', 'manage encryption keys') and explicit exclusions with the correct alternative for each ('Do NOT use for fresh external search... use infobroker_search_web'). This is the full when/when-not/alternative pattern.

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