On this page

connector-read

Run a READ-ONLY query for the ACTUAL ROWS of an OM-synced/Wexa DB source, LIVE against the source (nothing is copied into Wexa — ideal for large warehouse/DB sources). Use this ONLY for data/rows. For the shape of the source (which tables/collections exist and their fields), do NOT call this — read it from the ontology graph instead (fast, no live call): the connector's tables are Table nodes carrying name + fields. FIRST get a connectorId from the ontology with query-context: MATCH (t:Table) WHERE t.liveReadable = true AND t.connectorId IS NOT NULL RETURN t.name, t.connectorId, t.serviceType, t.readAction, t.fields (or DataService for source-level). ONLY use a connectorId from a node where liveReadable=true — nodes without connectorId are OM-crawled metadata and are NOT live-readable (passing one yields "invalid connector id"). Then call this with that connectorId + a query you formed from that shape: SQL → 'sql' (read-only SELECT) or 'table'; Mongo → 'table' + 'filter'/'aggregate', or 'list_collections'. Write/CRUD actions are blocked.

What it is called on each surface

The wire name is connector-read everywhere: it is what the Wexa MCP server advertises, the REST path is POST /v1/connector-read, and each SDK exposes it under its own language's naming convention.

SurfaceName
Wexa MCP serverconnector-read
REST APIPOST /v1/connector-read
TypeScript SDKfabric.connectorRead()
Python SDKfabric.connector_read()

Arguments

Every argument is optional: connector-read answers a bare call.

ArgumentTypeRequiredNotes
actionstringOptionalActionDef name of a READ action, e.g. "linear.get_issues". Use for connectors with synced read actions.
aggregatearrayOptionalMongo read-only aggregation stages (with 'table' = collection), e.g. [{"$group":{"_id":"$siteId","posts":{"$sum":1}}}]. Write stages ($out/$merge) are rejected.
connectorIdstringOptionalConnector id of the DB source (from the ontology DataService/Table node). Enables on-the-fly read when the source has no ActionDef.
filterobjectOptionalOptional Mongo find filter.
limitintegerOptionalMax rows (default 100, hard cap 10000).
list_collectionsbooleanOptionalMongo: list the source's collection names (on-the-fly discovery of the source shape, no row data).
paramsobjectOptionalAction parameters for an ActionDef read (e.g. table_name, filters, limit)
sqlstringOptionalA single read-only SELECT you formed from the project ontology (SQL sources). Writes are rejected.
tablestringOptionalTable/collection to read when not passing raw sql (returns SELECT * / find with a limit).

project_id, projectID, organization_id and executed_by are not arguments you pass: the platform binds all four from the credential you authenticated with, and both SDKs refuse them before the request leaves your process — see server-bound arguments.

What it returns

The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.

The shape of result for connector-read is not recorded here: it was not captured against a live deployment. Call it once and read what comes back rather than assuming a shape.

Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.

Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "connector-read",
    "arguments": {
      "action": "list_collections"
    }
  }
}

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. connector-read checks the fabric:query.read grant, and reaches the seven classes every tool reaches — listed under the common set. These are the ones specific to it:

ErrorStatusRaised when
NotFound404connectorId matches no connector wired to this project.
ConfigurationError5xxconnector-read is not available to you. Retrying will not help.

Governance

Every call to connector-read runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:query.read grant is checked, quota is drawn down, the arguments are validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit record is written. The lifecycle_id in the response is the handle to that record.

connector-read only reads, so it is not marked consequential: it is audited lightly and is never held for approval. It still consumes quota and is still refused by policy like anything else.

See also

The tool index and errors.