Suggest a change to a Request
suggest_query_updateSuggest an update to an existing approved query. A query's text is either a statement in the datasource's dialect or an operation of a published module, and which of the two it is was settled when it was authored: propose new text of the query's own kind. The suggestion will be reviewed by an administrator before being applied. The original query keeps its current enabled or disabled state until the update is approved. Policy scope resolution reads the statement to name the tables and columns it reaches. A statement it cannot follow raises a scope_unresolved objection for an Administrator to review; browser approval requires confirmation, while MCP query-management authority records the objection without blocking. It follows SELECT, INSERT, UPDATE and DELETE; non-recursive WITH clauses; derived tables and VALUES lists in FROM, each with an alias; joins, WHERE, GROUP BY, HAVING and ORDER BY; and parameters written as {{name}}. For authoring, a write must not start with WITH; move the CTE into a derived table in the write's FROM or USING clause, and a write inside a CTE body becomes the statement itself, with RETURNING if its rows are needed. It does not follow WITH RECURSIVE, a subquery inside a select item or a predicate (write it as a join or a WITH clause), or a table or column that is not in this datasource's schema (check it with get_schema). At the top level, UNION, INTERSECT and EXCEPT resolve every SELECT arm and record the union of every arm's data scope; output columns are matched by ordinal. If any arm cannot be followed, the whole statement raises a scope_unresolved objection rather than recording a partial scope. A set operation inside a WITH clause or derived table raises a scope_unresolved objection. It also follows projected aliases in GROUP BY, HAVING, and ORDER BY expressions, interval literals and {{name}} interval values, and date-part arguments declared by the datasource adapter (including MONTH and WEEK(MONDAY) where supported). String and comment boundaries follow the target datasource. Use an explicit PostgreSQL escape string when an ordinary backslash could change where a quote ends, and write Unicode identifier characters directly inside double quotes. A statement whose output lineage it cannot follow also counts every output as possibly sensitive for the glossary term-binding requirement, which refuses a call with term_binding_required once this Project holds any glossary term; bind each output's term through schema_bindings to clear it. A top-level set operation whose operator declares name matching (BY NAME, CORRESPONDING or STRICT CORRESPONDING), or carries an outer mode in front of its operator (FULL, LEFT, RIGHT or INNER), also counts every output as possibly sensitive for that requirement even when the whole statement resolves, because which column feeds each output cannot be followed; bind every output's term through schema_bindings, or write the operation positionally where the same column order is what the Request means.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query_id": "<query_id>",
"context": "<context>"
},
"name": "suggest_query_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | Updated statement, for a query whose text is a statement. | |
| name | No | Updated name | |
| tags | No | Updated tags for organizing queries | |
| module | No | Re-freezes an operation query against a module version. Supplied together with operation and artifact_hash; the three move as a whole or not at all. | |
| context | Yes | Explanation of why this update is needed | |
| query_id | Yes | UUID of the existing query to update | |
| operation | No | The operation inside the module this query's text is. Supplied together with module and artifact_hash. | |
| parameters | No | Updated parameter definitions. For request_kind "operation", a supplied list must include every parameter the operation requires and no parameter it does not declare. Omit to retain the Request's parameters. | |
| description | No | Updated description | |
| request_kind | No | Optional, and only ever the query's existing kind — a request's kind never changes. State it to be told plainly when you are proposing the wrong sort of text for this query. | |
| artifact_hash | No | The lowercase hex SHA-256 of the module version to re-freeze against. Supplied together with module and operation. | |
| application_id | No | Optional Application UUID whose build this call serves (Administrator only). Setup steps this call opens record it, so they show on that Application's build screen; the resources themselves stay shared by the Project. A shared step it reuses keeps the Application it was opened for, so a step it returns may be watchable with get_setup_journal only without application_id. Use the build's application_id, the one you call describe_application with. | |
| schema_bindings | No | Bind existing output names and parameter names to schema columns in this datasource. Each value is namespace.entity:path. The term is resolved from that column's glossary binding, authored separately under schema-governance authority; this is the only way to attach a term to a Request, and an inline term never counts. Replaces all bindings; {} clears them. An address must name a column this datasource has — for an operation Request, one of the paths its publish declared — or this call refuses it. At approval every output that reaches sensitive data, and every output and parameter of a request tagged composable, must be bound here; a statement whose output lineage cannot be resolved counts every output as possibly sensitive, and so does a set operation that matches its arms by name or carries an outer mode, even when it resolves. | |
| max_affected_rows | No | Positive cap for a modifying SQL statement or a declared connector operation. An operation cap must be between 1 and the manifest's declared max_affected. Omit for reads | |
| output_column_descriptions | No | Updated output column descriptions |