> For the complete documentation index, see [llms.txt](https://documentation.connexica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.connexica.com/cxair-ai/mcp-tools.md).

# 09. MCP Tools

## Tools exposed to external clients

| Tool                        | Purpose                                                                                                                                                               |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_capabilities`          | Returns an overview of available CXAIR capabilities and getting-started guidance.                                                                                     |
| `find_indexes`              | Finds accessible indexes by display name and returns exact field names and available distinct-count dynamic views.                                                    |
| `execute_query`             | Runs a paginated Lucene-format query against an index's QueryEngine name.                                                                                             |
| `execute_crosstab`          | Runs a crosstab and returns an HTML table or, for supported chart requests, a PNG image reference. Totals can report distinct counts using the index's dynamic views. |
| `find_saved_reports`        | Searches accessible saved reports by name.                                                                                                                            |
| `get_saved_report_metadata` | Returns metadata including the report query, index and filters.                                                                                                       |
| `execute_saved_report`      | Executes a saved query or crosstab report and returns its native result.                                                                                              |

## Additional internal CXAIR tools

| Area         | Tools                                                                                                           |
| ------------ | --------------------------------------------------------------------------------------------------------------- |
| Discovery    | `get_options`, `get_report_style_context`, `list_report_elements`, `get_pages_structure`, `get_element_details` |
| Elements     | `add_element`, `update_element`, `copy_element`, `link_element`, `remove_element`                               |
| Layout       | `manage_pages`, `manage_container`, `manage_cell`                                                               |
| Style        | `style_report_element`, `restyle_report`                                                                        |
| Verification | `render_current_page`, `pages_screenshot`                                                                       |

Pages design tools require a live CXAIR session and a Pages report in Design mode. They are intentionally not exposed by the external bearer-token endpoint.

## Tool-use principles

* Discover an index before supplying field names; names must match exactly.
* Use the QueryEngine name returned by discovery, not merely the display name.
* To count distinct values in a crosstab, set a total's `distinctCount` to a dynamic view name returned by `find_indexes`; omit it for the default `Records` count.
* Inspect report elements and details before updating them.
* Render or screenshot a page after design changes.
* Treat image URLs and references as temporary results.
