# Search knowledge files

Tool: `veryfront__search_knowledge`

Search knowledge files.

## Arguments

| Name                | Type                                     | Required | Description                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------- | ---------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`             | string · max length 500                  |          | Text to match against knowledge file paths and frontmatter. Omit query to list knowledge files.                                                                                                                                                                                                                                                                                                           |
| `cursor`            | string · min length 1 · max length 13334 |          | Opaque pagination token. Omit on the first request. To continue REST or MCP pagination, pass page\_info.next from the previous response as cursor.                                                                                                                                                                                                                                                        |
| `lookup_target`     | object                                   |          | Optional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found.                                                                                                                                                                                                  |
| `limit`             | integer · min 1 · max 12                 |          | Maximum number of results to return.                                                                                                                                                                                                                                                                                                                                                                      |
| `shard_count`       | integer · min 1 · max 8                  |          | Provide the shard count.                                                                                                                                                                                                                                                                                                                                                                                  |
| `shard_index`       | integer · min 0                          |          | Provide the shard index.                                                                                                                                                                                                                                                                                                                                                                                  |
| `project_reference` | string                                   |          | 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. |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__search_knowledge",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"query\":\"string\",\"mode\":\"search\",\"data\":[{\"path\":\"string\",\"matched_fields\":[\"string\"],\"frontmatter\":[{\"key\":\"string\",\"value\":\"string\"}]}],\"page_info\":{\"self\":\"string\",\"first\":{},\"next\":\"string\",\"prev\":\"string\"},\"returned\":0,\"total_matches\":0,\"shard\":{\"shard_index\":0,\"shard_count\":1,\"total_items\":0},\"limit\":1}"
      }
    ],
    "structuredContent": {
      "query": "string",
      "mode": "search",
      "data": [
        {
          "path": "string",
          "matched_fields": [
            "string"
          ],
          "frontmatter": [
            {
              "key": "string",
              "value": "string"
            }
          ]
        }
      ],
      "page_info": {
        "self": "string",
        "first": {},
        "next": "string",
        "prev": "string"
      },
      "returned": 0,
      "total_matches": 0,
      "shard": {
        "shard_index": 0,
        "shard_count": 1,
        "total_items": 0
      },
      "limit": 1
    }
  }
}
```
