Skip to main content
Glama
ydb-platform

YDB MCP

Official
by ydb-platform

ydb_describe_path

Retrieve detailed information about a specific path in a YDB database to understand its schema, statistics, and properties.

Instructions

Get detailed information about a YDB path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for ydb_describe_path tool. Calls server.describe_path(path) and serializes the result.
    async def ydb_describe_path(path: str) -> list[TextContent]:
        """Get detailed information about a YDB path (table, directory, etc.)."""
        try:
            return [TextContent(type="text", text=serialize_ydb_response(await server.describe_path(path)))]
        except Exception as e:
            return [TextContent(type="text", text=json.dumps({"error": str(e)}, indent=2))]
  • Registration of ydb_describe_path tool in the register_generic_tools loop at line 108.
    if tool in enabled:
        server.add_tool(fn, name=tool.value, description=description)  # type: ignore[arg-type]
  • Enum definition YDBGenericTool.DESCRIBE_PATH = 'ydb_describe_path'.
    DESCRIBE_PATH = "ydb_describe_path"
  • Server.describe_path() helper that calls YDB SDK scheme_client.describe_path() and also invokes _describe_table() for tables.
    async def describe_path(self, path: str) -> dict:
        """Describe a YDB path (directory, table, etc.).
    
        Returns a metadata dict. For tables also includes column/index details.
        """
        await self._ensure_connected()
        assert self._driver is not None
        response = await self._driver.scheme_client.describe_path(path)
        if response is None:
            return {"error": f"Path '{path}' not found"}
    
        entry_type = _ENTRY_TYPE_MAP.get(response.type, str(response.type))
        result: dict[str, Any] = {
            "path": path,
            "type": entry_type,
            "name": response.name,
            "owner": response.owner,
        }
        if getattr(response, "permissions", None):
            result["permissions"] = [
                {"subject": p.subject, "permission_names": list(p.permission_names)}
                for p in response.permissions
            ]
        if entry_type == "TABLE":
            result["table"] = await self._describe_table(path)
        return result
  • Helper that describes table columns, primary key, and indexes for TABLE type paths.
    async def _describe_table(self, path: str) -> dict:
        assert self._driver is not None
        session = await self._driver.table_client.session().create()
        try:
            desc = await session.describe_table(path)
            return {
                "columns": [
                    {"name": col.name, "type": str(col.type), "family": col.family}
                    for col in desc.columns
                ],
                "primary_key": list(desc.primary_key),
                "indexes": [
                    {
                        "name": idx.name,
                        "index_columns": list(idx.index_columns),
                        "cover_columns": list(idx.cover_columns) if hasattr(idx, "cover_columns") else [],
                        "index_type": str(idx.index_type) if hasattr(idx, "index_type") else None,
                    }
                    for idx in desc.indexes
                ],
            }
        finally:
            await session.delete()
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It only states a read operation but does not describe error behavior (e.g., path not found), rate limits, or authentication requirements. Minimal transparency.

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

Conciseness3/5

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

The description is a single sentence, which is concise but under-informative. It lacks crucial details that could be added without significant length.

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?

The tool has low complexity with one required parameter and an output schema, yet the description fails to explain what information is returned or any preconditions. It is incomplete for effective agent use.

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

Parameters1/5

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

Schema coverage is 0% and the description adds no meaning to the 'path' parameter. It does not specify format, constraints, or examples. The parameter remains completely undocumented.

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 clearly states the verb 'Get' and the resource 'detailed information about a YDB path', distinguishing it from sibling tools like 'ydb_list_directory' (lists directory contents) and 'ydb_explain_query' (explains queries). However, it lacks specificity about what 'detailed information' includes.

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 explicit guidance on when to use this tool versus alternatives. The description does not mention exclusions, prerequisites, or context. Usage is only implied by the tool's purpose.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ydb-platform/ydb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server