base-de-connaissances
title: Base de connaissances sidebar_label: Base de connaissances (16) sidebar_position: 3 doc_type: reference
Base de connaissances
En bref
Recherchez dans vos documents, posez des questions et exploitez votre base documentaire.
Prerequis
- Cle API avec le preset MCP et les scopes requis
- Client MCP configure (voir Configuration)
Exemples minimaux
Rechercher dans vos documents
- Listez vos sources documentaires :
{
"name": "knowledge_list_sources",
"arguments": {}
}
- Recherchez dans les documents :
{
"name": "knowledge_search",
"arguments": {
"query": "politique de remboursement",
"maxResults": 5
}
}
Poser une question avec citations
- Obtenez une reponse en langage naturel avec citations :
{
"name": "knowledge_ask",
"arguments": {
"question": "Quelle est la politique de retour ?"
}
}
knowledge_analytics
Affiche les statistiques de la base de connaissances.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
espaceId | string (uuid) | Non | Filter analytics to a specific espace |
periodDays | number | Non | Time period for usage metrics (days) (defaut : 30) |
staleDaysThreshold | number | Non | Days after which a document is considered stale (defaut : 90) |
Reponse
| Champ | Type | Description |
|---|---|---|
overview | object | |
totalDocuments | number | |
totalChunks | number | |
totalSources | number | |
storageUsedMb | number | |
lastUpdated | string | |
usage | object | |
searchQueries | number | |
uniqueUsers | number | |
topQueries | array | |
query | string | |
count | number | |
zeroResultsRate | number | |
periodDays | number | |
coverage | object | |
bySource | array | |
source | string | |
sourceType | string | |
documents | number | |
byCategory | array | |
category | string | |
unmappedDocuments | number | |
staleDocuments | number | |
quality | object | |
avgChunksPerDocument | number | |
documentsWithoutChunks | number | |
lowQualityDocuments | number | |
duplicateCandidates | number |
Outils lies :
knowledge_search,knowledge_list_sources
knowledge_ask
Posez une question en langage naturel et obtenez une reponse avec citations.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
query | string | Oui | The question to answer |
answerLength | choix (concise, detailed, comprehensive) | Non | Preferred answer length (defaut : "detailed") |
maxSources | number | Non | Maximum number of source documents to retrieve (defaut : 5) |
sourceIds | array | Non | Filter to specific knowledge source IDs |
Reponse
| Champ | Type | Description |
|---|---|---|
answer | string | |
confidence | number | |
citations | array | |
followUpQuestions | array | |
metadata | object | |
sourcesUsed | number | |
totalTimeMs | number |
Exemple
{
"name": "knowledge_ask",
"arguments": {
"question": "Quelle est la politique de retour ?"
}
}
Outils lies :
knowledge_search,knowledge_get_document,knowledge_entity_docs
knowledge_bulk_reprocess
Relance le traitement de plusieurs documents.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Oui |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
stages | array | Oui | Processing stages to re-run |
documentIds | array | Non | Document IDs (required when scopeType=documents) |
dryRun | boolean | Non | Preview mode: show what would be reprocessed without executing (defaut : true) |
priority | choix (low, normal, high) | Non | Job priority (defaut : "normal") |
scopeType | choix (all, source, documents, query) | Non | Scope type: all documents, by source, specific documents, or by query (defaut : "all") |
sourceIds | array | Non | Source IDs (required when scopeType=source) |
Reponse
| Champ | Type | Description |
|---|---|---|
jobId | string | |
status | string | |
dryRun | boolean | |
affectedDocuments | number | |
stages | array | |
scopeType | string |
Outils lies :
knowledge_analytics,knowledge_list_sources
knowledge_create_source
Cree une nouvelle source documentaire.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Non |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
config | record | Oui | Source-specific configuration (e.g., URL for url_crawl, repo for github) |
name | string | Oui | Source name |
type | choix (upload, github, confluence, notion, drive, s3, url_crawl, connecteur, livedata) | Oui | Source type |
description | string | Non | Source description |
espaceId | string (uuid) | Non | Espace ID to associate source with |
syncFrequencyMinutes | number | Non | Automatic sync frequency in minutes (0 = manual only, max 10080 = 1 week) |
Reponse
| Champ | Type | Description |
|---|---|---|
sourceId | string | |
name | string | |
type | string | |
status | string | |
description | string | |
createdAt | string |
Outils lies :
knowledge_upload_document,knowledge_list_sources,knowledge_sync_source
knowledge_delete_document
Supprime un document de la base de connaissances.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Oui |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
documentId | string (uuid) | Oui | ID of the document to delete |
Reponse
| Champ | Type | Description |
|---|---|---|
documentId | string | |
deleted | boolean | |
message | string |
Outils lies :
knowledge_list_documents,knowledge_get_document
knowledge_entity_docs
Recupere les documents lies a une entite de l'ontologie.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
entityId | string (uuid) | Oui | Entity ID to find documents for |
entityType | string | Non | Entity type filter (e.g., ObjectType, LinkType) |
includeLinkedEntities | boolean | Non | Include documents from related entities (1-hop) (defaut : false) |
limit | number | Non | Maximum documents to return (defaut : 20) |
Reponse
| Champ | Type | Description |
|---|---|---|
documents | array | |
documentCount | number | |
relatedEntities | array |
Outils lies :
knowledge_search,knowledge_ask,ontology_get_node
knowledge_explain_results
Explique le scoring et le classement des resultats de recherche documentaire.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
query | string | Oui | The search query to analyze |
espaceId | string (uuid) | Non | Filter by espace ID |
includeChunkDetails | boolean | Non | Include per-chunk score breakdown (defaut : true) |
topK | number | Non | Number of top results to explain (default: 3) (defaut : 3) |
Reponse
| Champ | Type | Description |
|---|---|---|
query | string | |
explanations | array | |
searchConfig | object | |
vectorEnabled | boolean | |
lexicalEnabled | boolean | |
graphBoostEnabled | boolean | |
rerankEnabled | boolean | |
minScoreThreshold | number |
Outils lies :
knowledge_search,knowledge_get_document,knowledge_get_related
knowledge_get_chunks
Recupere les fragments (chunks) d'un document avec leur contexte.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
documentId | string (uuid) | Oui | Document ID |
chunkIds | array | Non | Specific chunk IDs to retrieve |
endIndex | number | Non | End chunk index for range query |
includeParent | boolean | Non | Include parent chunk text for hierarchical context (defaut : true) |
limit | number | Non | Maximum chunks to return (defaut : 10) |
startIndex | number | Non | Start chunk index for range query |
Reponse
| Champ | Type | Description |
|---|---|---|
documentId | string | |
documentTitle | string | |
chunks | array | |
totalChunks | number |
Outils lies :
knowledge_get_document,knowledge_search,knowledge_explain_results
knowledge_get_document
Recupere le contenu complet d'un document.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
documentId | string (uuid) | Oui | Identifiant unique du document |
chunkLimit | number | Non | Maximum chunks to return if includeChunks is true (defaut : 20) |
includeChunks | boolean | Non | Include document chunks in response (defaut : false) |
Reponse
| Champ | Type | Description |
|---|---|---|
document | object | |
id | string | |
title | string | |
filename | string | |
mimeType | string | |
status | string | |
category | string | |
tags | array | |
description | string | |
pageCount | number | |
chunkCount | number | |
totalTokens | number | |
createdAt | string | |
updatedAt | string | |
effectiveDate | string | |
authority | string | |
language | string | |
isSuperseded | boolean | |
imageCount | number | |
canonicalId | string | |
chunks | array | |
index | number | |
text | string | |
tokenCount | number | |
pageStart | number | |
pageEnd | number | |
sectionTitle | string |
Outils lies :
knowledge_search,knowledge_get_chunks,knowledge_get_related
knowledge_get_related
Recupere les documents lies a un document donne.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
documentId | string (uuid) | Oui | Source document ID to find related content for |
minSimilarity | number | Oui | Minimum similarity threshold (0-1) |
relationTypes | array | Oui | Types of relationships to consider |
excludeIds | array | Non | Document IDs to exclude from results |
limit | number | Non | Maximum number of related documents per type (defaut : 5) |
Reponse
| Champ | Type | Description |
|---|---|---|
sourceDocument | object | |
id | string | |
title | string | |
category | string | |
tags | array | |
relatedDocuments | array | |
byType | object | |
semantic | array | |
entity | array | |
metadata | array | |
sharedEntities | array | |
stats | object | |
totalFound | number | |
semanticCount | number | |
entityCount | number | |
metadataCount | number |
Outils lies :
knowledge_search,knowledge_get_document,knowledge_explain_results
knowledge_list_documents
Liste les documents d'une source documentaire.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
category | string | Non | Filter by document category |
espaceId | string (uuid) | Non | Filter by espace ID |
limit | number | Non | Nombre maximum de resultats (defaut : 20) |
page | number | Non | Page number for pagination (defaut : 1) |
search | string | Non | Search in title and filename (simple text match, not semantic search) |
sortBy | choix (created_at, updated_at, title, file_size_bytes) | Non | Sort field (defaut : "created_at") |
sortOrder | choix (asc, desc) | Non | Sort order (defaut : "desc") |
sourceId | string (uuid) | Non | Identifiant de la source documentaire |
status | choix (pending, extracting, chunking, embedding, tree_building, entity_linking, graph_upserting, ready, error) | Non | Filter by document status (e.g., "ready", "pending", "error") |
tags | array | Non | Filter by document tags (documents must have ALL specified tags) |
Reponse
| Champ | Type | Description |
|---|---|---|
documents | array | |
total | number | |
page | number | |
limit | number | |
hasMore | boolean |
Outils lies :
knowledge_search,knowledge_get_document,knowledge_list_sources
knowledge_list_sources
Liste les sources documentaires de votre base de connaissances.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
espaceId | string (uuid) | Non | Filter by espace ID |
limit | number | Non | Nombre maximum de resultats (defaut : 50) |
offset | number | Non | Decalage pour la pagination (defaut : 0) |
status | choix (active, paused, error) | Non | Filter by source status |
type | choix (upload, github, confluence, notion, drive, s3, url_crawl, connecteur) | Non | Filter by source type |
Reponse
| Champ | Type | Description |
|---|---|---|
sources | array | |
total | number |
Exemple
{
"name": "knowledge_list_sources",
"arguments": {}
}
Outils lies :
knowledge_search,knowledge_get_document,knowledge_list_documents
knowledge_search
Recherche hybride dans vos documents (vectorielle + lexicale + graphe).
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
query | string | Oui | Terme ou question de recherche |
category | string | Non | Filter by document category |
dateFrom | string | Non | Filter docs effective after this date (ISO 8601) |
dateTo | string | Non | Filter docs effective before this date (ISO 8601) |
docAuthority | array | Non | Filter by document authority level |
espaceId | string (uuid) | Non | Filter by espace ID |
excludeSuperseded | boolean | Non | Exclude superseded/outdated documents |
graphBoost | boolean | Non | Enable graph-based boosting for entity-linked content (defaut : true) |
language | string | Non | Filter by detected language (fr, en, de, es, it, pt, nl) |
limit | number | Non | Maximum number of results (defaut : 10) |
tags | array | Non | Filter by document tags |
useReranking | boolean | Non | Enable cross-encoder reranking for improved relevance (defaut : true) |
Reponse
| Champ | Type | Description |
|---|---|---|
results | array | |
total | number | |
query | string |
Exemple
{
"name": "knowledge_search",
"arguments": {
"query": "politique de remboursement",
"maxResults": 5
}
}
Outils lies :
knowledge_get_document,knowledge_explain_results,knowledge_get_related
knowledge_similar
Trouve les documents similaires a un document donne.
| Scope | mcp.read |
| Lecture seule | Oui |
| Destructif | Non |
| Idempotent | Oui |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
documentId | string (uuid) | Oui | Source document ID to find similar documents for |
minScore | number | Oui | Minimum similarity score threshold |
limit | number | Non | Maximum number of similar documents to return (defaut : 10) |
Reponse
| Champ | Type | Description |
|---|---|---|
similar | array | |
id | string | |
title | string | |
score | number | |
overlapTopics | array | |
summary | string | |
totalFound | number |
Outils lies :
knowledge_search,knowledge_get_related,knowledge_get_document
knowledge_sync_source
Synchronise une source documentaire externe.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Oui |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
sourceId | string (uuid) | Oui | ID of the knowledge source to synchronize |
runType | choix (full, delta) | Non | Sync type: "full" re-ingests everything, "delta" only processes changes (defaut : "delta") |
Reponse
| Champ | Type | Description |
|---|---|---|
runId | string | |
sourceId | string | |
runType | string | |
status | string | |
message | string |
Outils lies :
knowledge_list_sources,knowledge_create_source
knowledge_upload_document
Importe un document dans la base de connaissances.
| Scope | mcp.write |
| Lecture seule | Non |
| Destructif | Non |
| Idempotent | Non |
Parametres
| Parametre | Type | Requis | Description |
|---|---|---|---|
content | string | Oui | Contenu du document (texte ou base64) |
title | string | Oui | Document title |
category | string | Non | Document category |
contentType | choix (base64, text) | Non | Content encoding: "base64" for binary files, "text" for plain text (defaut : "text") |
description | string | Non | Document description |
espaceId | string (uuid) | Non | Espace ID to associate document with |
filename | string | Non | Original filename (auto-generated from title if not provided) |
mimeType | string | Non | MIME type of the document (e.g., "application/pdf", "text/markdown", "text/plain") (defaut : "text/plain") |
sourceId | string (uuid) | Non | Identifiant de la source documentaire cible |
tags | array | Non | Document tags for categorization |
Reponse
| Champ | Type | Description |
|---|---|---|
documentId | string | |
title | string | |
filename | string | |
mimeType | string | |
fileSizeBytes | number | |
status | string | |
sourceId | string | |
message | string |
Outils lies :
knowledge_get_document,knowledge_create_source,knowledge_search
Depannage
| Code | Message | Solution |
|---|---|---|
| 404 | Document non trouve | Verifiez l'identifiant avec knowledge_list_sources. |
Besoin d'aide ?
Ecrivez-nous : Support et contact.