local_ydb_sql
Run YQL queries, retrieve execution plans, or preflight and confirm mutating executions against a local YDB instance.
Instructions
Run managed YQL v1 against the configured local-ydb target through Query Service. query uses SnapshotRO, explain returns plan/AST, and execute always runs EXPLAIN first and sends one NoTx execution only with confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Managed YQL action. query uses SnapshotRO, explain returns plan/AST without execution, and execute always EXPLAIN-preflights before optional confirmed NoTx execution. | query |
| script | Yes | Well-formed-Unicode YQL v1 script; lone UTF-16 surrogates are rejected. Parameter DECLARE statements are generated from parameters and prepended before execution. | |
| confirm | No | Considered only for action=execute. Must be true to send one NoTx execution after successful EXPLAIN; query remains SnapshotRO even when true. | |
| maxRows | No | Maximum retained rows per result set. The first limit hit stops all further result capture: read-only execution is cancelled, while confirmed NoTx execution drains without capturing later output. | |
| profile | No | Named profile from local-ydb.config.json. Defaults to config.defaultProfile. | |
| timeoutMs | No | Single deadline in milliseconds shared by connection, session, preflight, execution, and cancellation. | |
| configPath | No | Explicit local-ydb config file path to load for this tool call. Useful when the MCP server should pick up a different config without restart. | |
| parameters | No | Typed YQL parameters keyed by bare name. The request is limited to 100 parameters, 1,000 descriptor nodes, 10,000 value nodes, and 1 MiB of serialized parameter data. Struct field names must be well-formed Unicode. Values use the documented JSON representation and are never echoed in response metadata. Json/JsonDocument numbers must be finite, integer values must be JavaScript safe integers, and negative zero is rejected because JSON encoding cannot preserve its sign. | |
| databasePath | No | Configured tenant or root database path. Defaults to the selected profile tenant path; root paths use the static gRPC port. | |
| maxOutputBytes | No | Shared retained-output budget for issues, plan/AST, columns, and rows. |