Search knowledge files.
Arguments
projectReferenceID!requiredProject whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.
inputKnowledgeSearchInput!requiredinput.queryStringText to match against knowledge file paths and frontmatter, up to 500 characters. Omit query to list knowledge files.
input.cursorStringThe previous page's pageInfo.endCursor.
input.lookupTargetKnowledgeLookupTargetInputSource to search; omit for the main preview branch.
input.limitIntFiles per page, 1 to 12; default 6.
input.shardCountIntNumber of shards, 1 to 8; default 1.
input.shardIndexIntShard to read, 0 to shardCount - 1.
Responses
query KnowledgeSearch($projectReference: ID!, $input: KnowledgeSearchInput!) { knowledgeSearch(projectReference: $projectReference, input: $input) { query mode data { path matchedFields } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } returned totalMatches shard { shardIndex shardCount totalItems } limit }}{ "data": { "knowledgeSearch": { "query": "string", "mode": "search", "data": [ { "path": "string", "matchedFields": [ "string" ] } ], "pageInfo": { "hasNextPage": false, "hasPreviousPage": false, "startCursor": "string", "endCursor": "string" }, "returned": 0, "totalMatches": 0, "shard": { "shardIndex": 0, "shardCount": 0, "totalItems": 0 }, "limit": 0 } }}The KnowledgeSearchResult! in data.knowledgeSearch.