@@ -10,7 +10,10 @@ export const KnowledgeBlock: BlockConfig = {
1010 bestPractices : `
1111 - Clarify which tags are available for the knowledge base to understand whether to use tag filters on a search.
1212 - Use List Documents to enumerate documents before operating on them.
13+ - Use Get Document to retrieve full details including tags, connector metadata, and processing status.
1314 - Use List Chunks to inspect a document's contents before updating or deleting chunks.
15+ - Use List Connectors to see which external sources are syncing documents into the knowledge base.
16+ - Use Get Connector to check sync health and review recent sync logs.
1417 ` ,
1518 bgColor : '#00B0B0' ,
1619 icon : PackageSearchIcon ,
@@ -24,13 +27,17 @@ export const KnowledgeBlock: BlockConfig = {
2427 options : [
2528 { label : 'Search' , id : 'search' } ,
2629 { label : 'List Documents' , id : 'list_documents' } ,
30+ { label : 'Get Document' , id : 'get_document' } ,
2731 { label : 'Create Document' , id : 'create_document' } ,
2832 { label : 'Delete Document' , id : 'delete_document' } ,
2933 { label : 'List Chunks' , id : 'list_chunks' } ,
3034 { label : 'Upload Chunk' , id : 'upload_chunk' } ,
3135 { label : 'Update Chunk' , id : 'update_chunk' } ,
3236 { label : 'Delete Chunk' , id : 'delete_chunk' } ,
3337 { label : 'List Tags' , id : 'list_tags' } ,
38+ { label : 'List Connectors' , id : 'list_connectors' } ,
39+ { label : 'Get Connector' , id : 'get_connector' } ,
40+ { label : 'Trigger Sync' , id : 'trigger_sync' } ,
3441 ] ,
3542 value : ( ) => 'search' ,
3643 } ,
@@ -125,7 +132,14 @@ export const KnowledgeBlock: BlockConfig = {
125132 mode : 'basic' ,
126133 condition : {
127134 field : 'operation' ,
128- value : [ 'upload_chunk' , 'delete_document' , 'list_chunks' , 'update_chunk' , 'delete_chunk' ] ,
135+ value : [
136+ 'get_document' ,
137+ 'upload_chunk' ,
138+ 'delete_document' ,
139+ 'list_chunks' ,
140+ 'update_chunk' ,
141+ 'delete_chunk' ,
142+ ] ,
129143 } ,
130144 } ,
131145 // Document selector — advanced mode (manual ID input)
@@ -139,7 +153,14 @@ export const KnowledgeBlock: BlockConfig = {
139153 mode : 'advanced' ,
140154 condition : {
141155 field : 'operation' ,
142- value : [ 'upload_chunk' , 'delete_document' , 'list_chunks' , 'update_chunk' , 'delete_chunk' ] ,
156+ value : [
157+ 'get_document' ,
158+ 'upload_chunk' ,
159+ 'delete_document' ,
160+ 'list_chunks' ,
161+ 'update_chunk' ,
162+ 'delete_chunk' ,
163+ ] ,
143164 } ,
144165 } ,
145166
@@ -208,6 +229,16 @@ export const KnowledgeBlock: BlockConfig = {
208229 condition : { field : 'operation' , value : 'update_chunk' } ,
209230 } ,
210231
232+ // --- Connector operations ---
233+ {
234+ id : 'connectorId' ,
235+ title : 'Connector ID' ,
236+ type : 'short-input' ,
237+ placeholder : 'Enter connector ID' ,
238+ required : true ,
239+ condition : { field : 'operation' , value : [ 'get_connector' , 'trigger_sync' ] } ,
240+ } ,
241+
211242 // --- List Chunks ---
212243 {
213244 id : 'chunkSearch' ,
@@ -235,10 +266,14 @@ export const KnowledgeBlock: BlockConfig = {
235266 'knowledge_create_document' ,
236267 'knowledge_list_tags' ,
237268 'knowledge_list_documents' ,
269+ 'knowledge_get_document' ,
238270 'knowledge_delete_document' ,
239271 'knowledge_list_chunks' ,
240272 'knowledge_update_chunk' ,
241273 'knowledge_delete_chunk' ,
274+ 'knowledge_list_connectors' ,
275+ 'knowledge_get_connector' ,
276+ 'knowledge_trigger_sync' ,
242277 ] ,
243278 config : {
244279 tool : ( params ) => {
@@ -253,6 +288,8 @@ export const KnowledgeBlock: BlockConfig = {
253288 return 'knowledge_list_tags'
254289 case 'list_documents' :
255290 return 'knowledge_list_documents'
291+ case 'get_document' :
292+ return 'knowledge_get_document'
256293 case 'delete_document' :
257294 return 'knowledge_delete_document'
258295 case 'list_chunks' :
@@ -261,6 +298,12 @@ export const KnowledgeBlock: BlockConfig = {
261298 return 'knowledge_update_chunk'
262299 case 'delete_chunk' :
263300 return 'knowledge_delete_chunk'
301+ case 'list_connectors' :
302+ return 'knowledge_list_connectors'
303+ case 'get_connector' :
304+ return 'knowledge_get_connector'
305+ case 'trigger_sync' :
306+ return 'knowledge_trigger_sync'
264307 default :
265308 return 'knowledge_search'
266309 }
@@ -273,6 +316,7 @@ export const KnowledgeBlock: BlockConfig = {
273316 params . knowledgeBaseId = knowledgeBaseId
274317
275318 const docOps = [
319+ 'get_document' ,
276320 'upload_chunk' ,
277321 'delete_document' ,
278322 'list_chunks' ,
@@ -296,6 +340,15 @@ export const KnowledgeBlock: BlockConfig = {
296340 params . chunkId = chunkId
297341 }
298342
343+ const connectorOps = [ 'get_connector' , 'trigger_sync' ]
344+ if ( connectorOps . includes ( params . operation ) ) {
345+ const connectorId = params . connectorId ? String ( params . connectorId ) . trim ( ) : ''
346+ if ( ! connectorId ) {
347+ throw new Error ( `Connector ID is required for ${ params . operation } operation` )
348+ }
349+ params . connectorId = connectorId
350+ }
351+
299352 // Map list_chunks sub-block fields to tool params
300353 if ( params . operation === 'list_chunks' ) {
301354 if ( params . chunkSearch ) params . search = params . chunkSearch
@@ -329,6 +382,7 @@ export const KnowledgeBlock: BlockConfig = {
329382 documentTags : { type : 'string' , description : 'Document tags' } ,
330383 chunkSearch : { type : 'string' , description : 'Search filter for chunks' } ,
331384 chunkEnabledFilter : { type : 'string' , description : 'Filter chunks by enabled status' } ,
385+ connectorId : { type : 'string' , description : 'Connector identifier' } ,
332386 } ,
333387 outputs : {
334388 results : { type : 'json' , description : 'Search results' } ,
0 commit comments