Knowledge bases (KBases)
A KBase is a container for your content. When you add content to a KBase it is
chunked, embedded and indexed for retrieval, and a knowledge graph describing the concepts it
contains is built alongside it. These tools let an agent create, remove, enumerate and describe
KBases, change the metadata of one, and fill one from a PDF document or a web page.
The identifier returned by these tools is the indexId used by nearly every other
tool on this server.
- CreateKBase
- UpdateKBaseMetadata
- DeleteKBase
- ListKBases
- ListOpenKBases
- GetKBaseMetadata
- FillFromDocument
- LoadFromWebsite
CreateKBase
destructiveCreates a new, empty knowledge base owned by the calling account.
Parameters
| Name | Type | Description |
|---|---|---|
kbaseName | string | The display name for the new knowledge base. |
Returns
The Id of the newly created knowledge base. Keep it — it is the indexId that other tools expect.
UpdateKBaseMetadata
destructive
Changes the descriptive metadata of one of your knowledge bases: what it is called and
describes, who wrote it, how it is licensed, and whether it is shared publicly. Every
value except the Id is optional; omit a value, or pass null, to leave that
part of the metadata as it is.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase to modify. |
kbaseName | string | Optional. The name of the knowledge base. |
author | string | Optional. The author of the knowledge base. |
copyright | string | Optional. The copyright information of the knowledge base. |
description | string | Optional. The description of the knowledge base. |
isPublicWebsite | boolean | Optional. true to publish the knowledge base as a public website. |
showOnList | boolean | Optional. true to allow the knowledge base to appear on the public list returned by ListOpenKBases. |
Returns
true when the metadata was updated.
A KBase that does not exist, or that you do not own, fails with KBase not found.
DeleteKBase
destructivePermanently deletes a knowledge base, together with its indexed content and knowledge graph. You can only delete knowledge bases that you own; deleting anything else fails with KBase not found.
Parameters
| Name | Type | Description |
|---|---|---|
kbaseId | string | The Id of the KBase to delete. |
Returns
true when the knowledge base was deleted.
Lists every knowledge base belonging to the calling account. This is normally the first tool an agent calls.
Parameters
None.
Returns
A list of records, each containing:
| Field | Type | Description |
|---|---|---|
Id | string | The Id of the knowledge base. |
Name | string | The name of the knowledge base. |
Description | string | The description of the knowledge base, if one has been set. |
Lists the publicly shared ("open") knowledge bases published on this server, whoever owns them. Use it to discover shared reference material that you can search or chat with, even though you cannot modify it.
Parameters
None.
Returns
A list of records with the same Id, Name and Description fields as ListKBases.
Gets the descriptive metadata held about one of your knowledge bases: what it is called and describes, who wrote it and how it is licensed. Use it when you need the author or copyright of a KBase, which ListKBases does not return.
Parameters
| Name | Type | Description |
|---|---|---|
kbaseId | string | The Id of the KBase. |
Returns
A record describing the knowledge base:
| Field | Type | Description |
|---|---|---|
Name | string | The name of the knowledge base. |
Description | string | The description of the knowledge base, if one has been set. |
Author | string | The author of the knowledge base, if one has been set. |
Copyright | string | The copyright information of the knowledge base, if any has been set. |
A KBase that does not exist, or that you do not own, fails with KBase not found.
FillFromDocument
destructiveFills a knowledge base from a PDF document. The document is read page by page, chunked, embedded and indexed, and its concepts are added to the knowledge graph of the KBase.
MCP tools cannot accept binary streams, so the document is not uploaded to the server. Instead it is supplied as a URL that the server can read from — a file share, blob storage or any other location the server can reach. If the client supplies a progress token, progress is reported back as MCP progress notifications as the pages are ingested.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase to add the document to. |
fileName | string | The file name of the document, which must be a PDF. e.g. handbook.pdf. |
blobUrl | string | The url of the document in a file share, blob storage etc. |
start | integer | Optional. The page number to begin ingestion at. If omitted, ingestion starts at the first page. |
end | integer | Optional. The page number to end ingestion at. If omitted, ingestion continues to the last page. |
Returns
The Id of the content added to the knowledge base.
A KBase that does not exist, or that you do not own, fails with KBase not found. A document that is not a PDF, a URL that is empty, or a page range that is not valid, fails with a description of the problem.
LoadFromWebsite
destructiveFills a knowledge base from a web page. The page is read, chunked, embedded and indexed, a node representing the page is added to the knowledge graph of the KBase, and a topic node is created and connected to it for each topic found on the page.
Parameters
| Name | Type | Description |
|---|---|---|
indexId | string | The Id of the KBase to add the web page to. |
url | string | The url of the web page to ingest. |
Returns
The Id of the node created for the web page.
A KBase that does not exist, or that you do not own, fails with KBase not found. A url that is empty or is not a valid URL fails with a description of the problem.