Operating the Historical Database over MCP¶
Everything in this section applies unchanged when a historical table is driven through the Center's MCP tools: the same AMI SQL creates, loads, optimizes, indexes, and queries it. What differs is covered below, and each item surprises people.
For the tool surface itself, connecting, and how to verify the endpoint is live, see Operating 3forge Enterprise over MCP.
A query returns a handle, not rows¶
See Operating over MCP: a SELECT, an aggregate, a join, or count(*) returns a deferred-query handle, not row values. Metadata queries are unaffected and do return materialized rows, which is what makes the verification steps elsewhere in this section work over MCP: the row-count check in the Quickstart, and DESCRIBE TABLE and DIAGNOSE TABLE in Creating a Historical Table.
To read actual row values an agent needs a synchronous transport, the REST query endpoint or JDBC. The REST query endpoint is disabled by default; see Operating over MCP.
Send one write statement per call¶
See Operating over MCP: one write statement per call. Three INSERT statements in a single call against a historical table left only one row committed; the same three sent separately committed all three, so confirm every write with the row-count check in the Quickstart.
A single INSERT with multiple value tuples is one statement and is fine:
Do not gate a statement on the syntax pre-check¶
See Operating over MCP: syntax pre-check. SELECT FROM WHERE against a historical table passes center_verify(op="amisql") and fails on execution with Error At Line 1, position 7. Verify a statement by executing it, and handle the execution error.
What is not repeated here¶
Capability questions an agent has to get right are answered on the pages that own them:
- Whether two historical tables can be joined. They can. See Querying, which also covers the accepted join clause forms and the two-table limit.
- Which query forms are unsupported, with the exact error string and correction for each. See Troubleshooting.
- Why not to index a nullable or
BOOLEANcolumn. See Querying.