Skip to main content
Picking explain_table from your client’s prompt menu makes TablePro read the table first. So the model gets its real columns, indexes and DDL rather than a template asking it to guess. Rendering happens on the server, inside prompts/get.

Listing and getting

prompts/list returns the catalog with each prompt’s arguments. prompts/get renders one:
The result is a description and one user message. Argument values must be scalars: a number or a boolean is read as its text, an array or object is rejected. An argument the prompt does not declare is rejected with -32602, as is a missing required one. Every clears the same gates a tool call does: the token’s resources:read scope, its connection allowlist, and the connection’s External Clients level and AI policy. See Scopes and gates. The read is recorded in the activity log.

Shared arguments

Most prompts take these:

The catalog

Required arguments come first; optional ones follow in parentheses. audience is newcomer (default), analyst or engineer. period is today, this_week (default), this_month or all, and limit runs 1 to 500, default 50. tables on question_to_sql is comma-separated; the largest few are used when it is omitted, and only the first 6 either way. Statement text is truncated at 8,000 characters where review_query and propose_indexes echo your query and explain_plan, and at 600 characters per row in the summarize_query_history table.

What comes back

One user message, as Markdown. explain_table renders this shape:

Completions

completion/complete resolves a prompt argument or a resource-template variable against the live schema. It needs resources:read.
ref is either { "type": "ref/prompt", "name": ... } or { "type": "ref/resource", "uri": ... }. An unknown prompt or an unrecognized template is -32602.

What resolves

Anything else returns an empty list rather than an error.

Context matters

database, schema and table need to know which connection to read. Pass it in context.arguments under connection, connection_id, or id. Without one, the result is empty. For a ref/resource completion TablePro fills the context from the URI itself, so completing table in tablepro://connections/{id}/tables/{table} already knows the connection, and the database and schema query parameters if the URI carries them. Anything you pass in context.arguments wins.

Matching and limits

Values whose name starts with what you typed come first, then values that merely contain it, each group sorted naturally, case ignored. Fixed value lists such as audience keep their declared order instead. Completing connection with a value that matches no name falls back to matching UUIDs, so pasting an id into a field that normally takes a name still works. At most 100 values come back; total counts the matches before that cap and hasMore says whether it applied. Schema reads are cached for 15 seconds per token and per scope, so typing a table name does not hit the database on every keystroke.