Skip to main content
Glama
ydb-platform

YDB MCP

Official
by ydb-platform

ydb_query_with_params

Run a read-only SQL query with JSON parameters to safely retrieve data from a YDB database.

Instructions

Run a read-only parameterized SQL query with JSON parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.4
    • addedInput schema / properties / params / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / params / type
      Removed value: -"string"
    • changedInput schema / title
      Previous value: -"query_with_paramsArguments"New value: +"ydb_query_with_paramsArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "Annotations": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "audience": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "enum": [
      +                  "user",
      +                  "assistant"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Audience"
      +        },
      +        "priority": {
      +          "anyOf": [
      +            {
      +              "maximum": 1,
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Priority"
      +        }
      +      },
      +      "title": "Annotations",
      +      "type": "object"
      +    },
      +    "TextContent": {
      +      "additionalProperties": true,
      +      "description": "Text content for a message.",
      +      "properties": {
      +        "_meta": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "title": "Meta"
      +        },
      +        "annotations": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/Annotations"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null
      +        },
      +        "text": {
      +          "title": "Text",
      +          "type": "string"
      +        },
      +        "type": {
      +          "const": "text",
      +          "title": "Type",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "text"
      +      ],
      +      "title": "TextContent",
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "result": {
      +      "items": {
      +        "$ref": "#/$defs/TextContent"
      +      },
      +      "title": "Result",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "ydb_query_with_paramsOutput",
      +  "type": "object"
      +}
  2. First observed

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It clearly discloses the read-only nature of the operation, which is the most critical behavioral trait. However, it does not mention execution semantics, authentication, or error behavior, though the output schema covers result shape.

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

Conciseness4/5

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

The description is a single, front-loaded sentence with no filler. It is appropriately compact for the tool's simplicity, though it is terse enough that some semantic gaps remain.

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

Completeness2/5

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

Given the lack of annotations, minimal parameter documentation, and presence of close sibling tools, the description is not complete enough for reliable selection and invocation. An agent would need to inspect other tools or examples to know when to choose this one and how to construct valid parameters.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It conveys that parameters are passed as JSON, which slightly clarifies the schema's anyOf string/object type, but it does not explain what 'sql' contains, how params map to query placeholders, or how JSON strings versus objects are handled.

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

Purpose4/5

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

The description states a clear action ('Run'), a specific resource ('read-only parameterized SQL query'), and the input format ('JSON parameters'). It mostly distinguishes itself from siblings like ydb_explain_query_with_params by indicating execution rather than explanation, though it doesn't explicitly name the non-parameterized alternative.

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

Usage Guidelines2/5

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

No guidance is given about when to use this tool versus sibling tools such as ydb_query, ydb_explain_query, or ydb_explain_query_with_params. The agent is left to infer selection criteria from the name and one-line description.

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