knowledgeSearch

Search knowledge files.

Arguments

  • projectReferenceID!required

    Project 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!required

  • input.queryString

    Text to match against knowledge file paths and frontmatter, up to 500 characters. Omit query to list knowledge files.

  • input.cursorString

    The previous page's pageInfo.endCursor.

  • input.lookupTargetKnowledgeLookupTargetInput

    Source to search; omit for the main preview branch.

  • input.limitInt

    Files per page, 1 to 12; default 6.

  • input.shardCountInt

    Number of shards, 1 to 8; default 1.

  • input.shardIndexInt

    Shard 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.