Skip to main content
Glama

local_ydb_sql

Destructive

Execute managed YQL v1 against local-ydb: run read-only queries, retrieve EXPLAIN plans/ASTs, or perform confirmed writes with mandatory preflight EXPLAIN.

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

TableJSON Schema
NameRequiredDescriptionDefault
actionNoManaged YQL action. query uses SnapshotRO, explain returns plan/AST without execution, and execute always EXPLAIN-preflights before optional confirmed NoTx execution.query
scriptYesWell-formed-Unicode YQL v1 script; lone UTF-16 surrogates are rejected. Parameter DECLARE statements are generated from parameters and prepended before execution.
confirmNoConsidered only for action=execute. Must be true to send one NoTx execution after successful EXPLAIN; query remains SnapshotRO even when true.
maxRowsNoMaximum 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.
profileNoNamed profile from local-ydb.config.json. Defaults to config.defaultProfile.
timeoutMsNoSingle deadline in milliseconds shared by connection, session, preflight, execution, and cancellation.
configPathNoAbsolute path to an explicit local-ydb config file. Missing, unreadable, oversized, or invalid explicit files fail closed instead of using defaults.
parametersNoTyped 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.
databasePathNoConfigured tenant or root database path. Defaults to the selected profile tenant path; root paths use the static gRPC port.
maxOutputBytesNoShared retained-output budget for issues, plan/AST, columns, and rows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.21
    • changedInput schema / properties / configPath / description
      Previous value: -"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."New value: +"Absolute path to an explicit local-ydb config file. Missing, unreadable, oversized, or invalid explicit files fail closed instead of using defaults."
    • addedInput schema / properties / configPath / minLength
      Added value: +1
  2. Addedv0.1.13

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses critical runtime behavior beyond the annotations: query uses SnapshotRO, explain returns plan/AST, and execute always runs EXPLAIN first and sends a single NoTx execution only when confirm=true. This meaningfully supplements the coarse readOnlyHint/destructiveHint flags with action-specific safety semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two efficient sentences with no filler; the core purpose is front-loaded and the action-specific behavior is compressed into one follow-up sentence. Every clause adds useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is compact but covers the key behavioral modes and is supported by a very rich input schema and annotations. It does not describe the output shape for query results, but output-related constraints like maxRows and maxOutputBytes are documented in the schema, and the absence of an output schema makes this a minor gap rather than a blocking one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents all parameters with detailed descriptions, including action, confirm, maxRows, timeoutMs, and parameters. The tool description largely restates the action behavior rather than adding new parameter-level meaning, so the schema-heavy baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Run managed YQL v1 against the configured local-ydb target through Query Service.' It also distinguishes the three modes (query, explain, execute) and is clearly unique among the sibling tools, which focus on infrastructure, schema, auth, and lifecycle operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear execution context by identifying the target and the Query Service, and it explains what each action does so an agent can choose among query/explain/execute. It does not explicitly compare against sibling tools, but no sibling performs YQL execution, so the usage context is strong enough.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.