# search

> The docs MCP server's tool that searches the full text of the AirBuild docs and returns the five best-matching pages, each with an excerpt.

Source: https://air.build/docs/docs-mcp/search/

`search` looks for words in the full text of the AirBuild docs in one language and returns up to five pages, best first, each with its title, its address and an excerpt. Read a result in full with [get_page](https://air.build/docs/docs-mcp/get_page/). It is read-only.

It is one of the three tools of the docs MCP server (see [Address and connection](https://air.build/docs/docs-mcp/address/)), which reads the AirBuild docs and needs no sign-in.

| Read-only | Destructive | Idempotent |
| --- | --- | --- |
| Yes | No | Yes |

## Inputs

| Input | Type | Required | Default | What it does |
| --- | --- | --- | --- | --- |
| `query` | string | Yes | — | The words to look for, separated by spaces |
| `language` | string | No | `en` | The docs language: `en`, `zh-CN`, `zh-TW`, `ja`, `ko`, `es`, `fr`, `de`, `pt`, `ru`, `ar` or `hi` |

## How pages are ranked

- Matching ignores case and matches inside words: `build` also matches `runbuild` and `builds`.
- A page scores one point for each time any query word appears in it, and three points for each appearance when that word is also in the page's title.
- Pages that match no word are left out. The five highest scores are returned.
- The excerpt is taken around the first place the first query word appears in the page (from the top of the page when it does not appear).

Short, specific words work best: `testflight testers` rather than a whole question.

## Result

One text block with a section per page: the page's title as a heading, its address, then the excerpt between ellipses.

```md
## runbuild
https://air.build/docs/cli/runbuild/

…builds a Project by running the build script in its airbuild.yaml, then brings back what the script built…
```

When nothing matches, the text is `Nothing found.`

## Errors

`search` returns no errors of its own: an empty or missing `query`, or a `language` with no docs, answers `Nothing found.` The errors every call to the docs server can return are on [Address and connection](https://air.build/docs/docs-mcp/address/#errors).

## Example

```json
{"name": "search", "arguments": {"query": "invite testers"}}
```
