semantic_query
Use when no column stores the answer: run a read-only SELECT, then have the server model read one text column to keep rows matching a plain-language criterion or add a short answer per row.
Instructions
For questions about what text says when no column records it, e.g. 'which complaints ask for a refund'. Runs one read-only SELECT through the same checks as run_query, then has the server's model read one text column of the returned rows and either keep the rows that meet a criterion or add a short answer per row. Returns columns, rows, how many rows were judged, and which text was sent to the model. Off unless the server enables it (SCHEMAGATE_MCP_SEMANTIC=1), because the row text goes to the model provider; at most 200 rows are judged. Use plain run_query whenever a column already holds the answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One read-only SELECT (or WITH ... SELECT) written against the DDL select_schema returned. Writes, DDL and multiple statements are refused, as is any table or column this caller may not read. | |
| roles | No | The caller's roles or groups, e.g. ['finance', 'payroll']. Objects and columns restricted to a role are visible only when it is listed here. Omitted = no roles. | |
| column | Yes | The result column whose text the model reads, e.g. 'body' or 'complaint_text'. Must be one of the columns the SQL returns. | |
| extract | No | Add one short answer per row, e.g. 'which product is mentioned'. Give this or criterion, not both. | |
| max_rows | No | Most rows to return (default 50, at most 200). The result says when it was truncated. | |
| criterion | No | Keep only rows whose text meets this, in plain language, e.g. 'asks for a refund'. Give this or extract, not both. | |
| principal | No | Who is asking, as an identity string such as 'okta:jdoe'. Pass it whenever you know the user: visibility is decided for this identity. Omitted = anonymous, which sees only unrestricted objects. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |