# Search file text

Tool: `veryfront__search_file_text`

Search file text. Requires project.files.read.

## Arguments

| Name                | Type                      | Required | Description                                                                                   |
| ------------------- | ------------------------- | -------- | --------------------------------------------------------------------------------------------- |
| `ref`               | string                    |          | Content to read: main, branch:<name-or-id>, release:<version> or env:<name>. Omit for main.   |
| `query`             | string                    | Yes      | Literal text to find, or a regular expression when is\_regex is true.                         |
| `pattern`           | string                    |          | File path pattern, for example *.tsx or pages/*.                                              |
| `is_regex`          | boolean                   |          | Read query as a regular expression (default false).                                           |
| `case_sensitive`    | boolean                   |          | Match letter case exactly (default false).                                                    |
| `limit`             | integer · min 1 · max 100 |          | Largest number of matching files, 1 to 100 (default 50). It limits files, not matching lines. |
| `project_reference` | string                    |          | Project ID or slug (defaults to the current project)                                          |

## 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_file_text",
    "arguments": {
      "query": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"path\":\"string\",\"version_id\":\"string\",\"matches\":[{\"line\":0,\"content\":\"string\"}]}],\"total_matches\":0}"
      }
    ],
    "structuredContent": {
      "data": [
        {
          "path": "string",
          "version_id": "string",
          "matches": [
            {
              "line": 0,
              "content": "string"
            }
          ]
        }
      ],
      "total_matches": 0
    }
  }
}
```
