工具 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
调用信息
- 工具标识
- mcp-server-neon.complete_query_tuning
- 服务提供方
- Neon
- 平均响应
- 0 ms
- 近 7 天调用
- 0
输入参数
suggestedSqlStatements必填The SQL DDL statements to execute to improve performance. These statements are the result of the prior steps, for example creating additional indexes.
applyChangesWhether to apply the suggested changes to the main branch
tuningId必填The ID of the tuning to complete. This is NOT the branch ID. Remember this ID from the prior step using tool prepare_query_tuning.
databaseName必填The name of the database to execute the query against
projectId必填The ID of the project to execute the query against
roleNameThe 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.
shouldDeleteTemporaryBranchWhether to delete the temporary branch after tuning
temporaryBranchId必填The ID of the temporary branch that needs to be deleted after tuning.
branchIdThe ID or name of the branch that receives the changes. If not provided, the default (main) branch will be used.