TOOL API
complete_ query_ tuning
Complete a query tuning session by either applying the changes to the main branch or discarding them. <important_notes> BEFORE RUNNING THIS TOOL: test out the changes in the temporary branch first by running - `run_sql` with the suggested DDL statements. - `explain_sql_statement` with the original query and the temporary branch. This tool is the ONLY way to finally apply changes after the `prepare_query_tuning` tool to the main branch. You MUST NOT use `prepare_database_migration` or other tools to apply query tuning changes. You MUST pass the `tuning_id` obtained from the `prepare_query_tuning` tool, NOT the temporary branch ID as `tuning_id` to this tool. You MUST pass the temporary branch ID used in the `prepare_query_tuning` tool as TEMPORARY branchId to this tool. The tool OPTIONALLY receives a second branch ID or name which can be used instead of the main branch to apply the changes. This tool MUST be called after tool `prepare_query_tuning` even when the user rejects the changes, to ensure proper cleanup of temporary branches. </important_notes> This tool: 1. Applies suggested changes (like creating indexes) to the main branch (or specified branch) if approved 2. Handles cleanup of temporary branch 3. Must be called even when changes are rejected to ensure proper cleanup Workflow: 1. After `prepare_query_tuning` suggests changes 2. User reviews and approves/rejects changes 3. This tool is called to either: - Apply approved changes to main branch and cleanup - OR just cleanup if changes are rejected
Call information
- Tool slug
- mcp-server-neon.complete_query_tuning
- Provider
- Neon
- Average response
- 0 ms
- Calls in 7 days
- 0
Input parameters
suggested_sql_statementsrequiredThe SQL DDL statements to execute to improve performance. These statements are the result of the prior steps, for example creating additional indexes.
apply_changesWhether to apply the suggested changes to the main branch
tuning_idrequiredThe ID of the tuning to complete. This is NOT the branch ID. Remember this ID from the prior step using tool prepare_query_tuning.
database_namerequiredThe name of the database to execute the query against
project_idThe ID of the project to execute the query against. Required for an unscoped connection. May be omitted when the connection is scoped to one project; if provided, it must match that project.
role_nameThe name of the role to connect with. If you have used a specific role in prepare_query_tuning you MUST pass the same role again to this tool. If not provided, the default role (usually "neondb_owner") will be used.
should_delete_temporary_branchWhether to delete the temporary branch after tuning
temporary_branch_idrequiredThe ID of the temporary branch that needs to be deleted after tuning.
branch_idThe ID or name of the branch that receives the changes. If not provided, the default (main) branch will be used.