Skip to main content
Glama
LiteDB desktop

LiteDB desktop

Describe a table

describe_table
Read-only

Inspects a table’s columns, types, keys, indexes, and sample values before you write SQL, so you can query unfamiliar schemas correctly.

Instructions

Columns and types for one table, with primary keys, NOT NULL, defaults, foreign keys, indexes, and, for low-cardinality text columns, the distinct values they actually contain. Read this before writing SQL against a table you have not seen.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "<table>"
    },
    "name": "describe_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYesTable name. Case-insensitive.
include_sample_valuesNoInclude a few distinct values for enumerated columns (default true). These are real values from the table.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already mark this read-only and closed-world, so the safety profile is covered. The description goes further by disclosing that returned sample values are real data from the table, which is meaningful disclosure for an agent deciding whether output is safe to echo. It does not mention row/column caps or cost on very wide tables, keeping it below a 5.

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?

Two sentences, no filler: the first defines the payload, the second defines the call site. The most decision-relevant content (what you get) is front-loaded.

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

Completeness5/5

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

With no output schema, the description carries the return-shape burden and does so by listing the returned metadata categories plus the optional sample-value behavior. For a two-parameter read-only introspection tool, nothing an agent needs to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description earns an extra point by explaining which columns actually yield sample values — low-cardinality text columns — a scoping detail the schema's terser "enumerated columns" wording only hints at.

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?

States a specific resource (one table) and enumerates exactly what it returns: columns, types, primary keys, NOT NULL, defaults, foreign keys, indexes, and sample values. This cleanly separates it from siblings like list_tables (enumeration) and query (execution) without needing to name them.

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?

"Read this before writing SQL against a table you have not seen" gives a concrete trigger condition tied to a real workflow. It stops short of stating when not to call it (e.g. for tables already inspected this session) or pointing at list_tables for discovery, so it is clear but not exhaustive.

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