Skip to main content

MCP Resources

Resources are read-only views of TablePro state. AI clients use them to discover what is available before calling tools. Every resource is scope-gated the same way as tools and respects the per-connection allowlist. URIs use the tablepro:// scheme inside the MCP transport. Do not confuse them with shell-level URL scheme deep links.

Discovery

Two MCP methods enumerate resources:
  • resources/list returns the static tablepro://connections resource plus a schema and history entry for each currently connected database.
  • resources/templates/list returns the URI templates for tablepro://connections/{id}/schema and tablepro://connections/{id}/history, so clients can construct a URL for any connection without waiting for it to be open.

Response envelope

resources/read wraps the resource payload in the MCP standard envelope:
The shapes documented below are what you get after parsing text as JSON.

tablepro://connections

All saved connections with their current session state. Returns:
database reflects the active session database when connected, otherwise the saved default. type uses display casing (MySQL, PostgreSQL, SQLite, etc.). safe_mode is one of silent, alert, alertFull, safeMode, safeModeFull, readOnly. ai_policy is one of askEachTime, alwaysAllow, never. Connections with externalAccess: blocked are omitted. The envelope matches the list_connections tool. Scope: readOnly.

tablepro://connections/{id}/schema

Tables and columns visible on the current connection session. Path parameter: id is the connection UUID. Returns:
The response is flat: tables for the active database/schema only. To switch context, call the switch_database or switch_schema tool first. type matches the underlying TableType raw value (for example table, view). Capped at 100 tables. When more exist, the response also includes truncated: true and total_tables: <count>. For larger schemas, page through list_tables instead. Scope: readOnly.

tablepro://connections/{id}/history

Recent query history for a connection. Path parameter: id is the connection UUID. Query parameters: Returns:
executed_at is an ISO 8601 timestamp. execution_time_ms is a double in milliseconds. error_message is included when was_successful is false. Scope: readOnly.

Errors