discover_context
discover_context answers the question "what is governed in this workspace?" It lists every governed asset — tables and columns — from the current deployment publication's deployed instruction decisions, with a per-asset instruction count and the canonical scenario keys under which instructions govern it. Like every Metatate MCP tool it is read-only and advisory: it describes published governance state and never changes it. Clients that present hyphenated tool names can call it as discover-context; the alias is accepted 1:1.
When to useDirect link to When to use
Call discover_context first, before any per-asset question:
- To map the governed surface of a workspace before drilling into a specific table or column.
- To collect the exact asset references (
database,schema,table,column) and canonicalscenario_keyvalues that later calls toget_decision_context,inspect_governance_rules, andauthorize_useaccept. - To confirm that a workspace has a current publication at all — if nothing is published, this tool says so with a typed answer state instead of an empty list.
InputDirect link to Input
All parameters are optional. An empty input ({}) lists every governed asset visible to the workspace.
| Parameter | Type | Required | Description |
|---|---|---|---|
database | string | No | Filter to one database, by exact normalized name (for example acmecloud_demo). |
schema | string | No | Filter to one schema, by exact normalized name (for example public). |
domain | string | No | Accepted by the schema, but answers with a not_supported error today (see below). |
sensitivity | string | No | One of public, internal, confidential, restricted. Accepted by the schema, but answers not_supported today. |
pii | boolean | No | Accepted by the schema, but answers not_supported today. |
compliance_tag | string | No | Accepted by the schema, but answers not_supported today. |
The input schema is strict: unknown keys are rejected with invalid_parameters.
OutputDirect link to Output
A successful call returns one JSON payload as the tool result's structured content (also serialized into the text content), discriminated by state.
When the state is answered:
| Field | Description |
|---|---|
state | "answered". |
assets | Array of governed-asset summaries (may be empty after filtering). |
assets[].ref | The asset scope: database, schema, table, and column. column is always present and is null for a table-level entry. Table-level and column-level scopes appear as separate entries. |
assets[].instruction_count | How many published instructions govern this exact scope. |
assets[].scenario_keys | The canonical scenario keys under which instructions govern the scope — valid values for scenario_key in follow-up calls. |
publication | Provenance of the current deployment publication: publication_id and published_at. |
Answer statesDirect link to Answer states
discover_context returns two of the three typed answer states — it never returns review_required:
answered— a current publication exists and carries instruction state; the governed-asset list is returned.not_enough_published_state— withreason_codeno_current_publication(no deployment publication is current) orno_published_instruction_state(a current publication exists but carries zero instruction decisions). The payload carries a fixedmessage, anunresolved_targetsarray (always empty for this tool), andnext_actionsguidance. A missing publication is never reported as an empty "nothing governed" list.
See Typed answer states for the full model.
ExampleDirect link to Example
Request arguments:
{
"database": "acmecloud_demo",
"schema": "public"
}
Response (trimmed to three assets; a real answer lists every governed scope):
{
"state": "answered",
"assets": [
{
"ref": {
"database": "acmecloud_demo",
"schema": "public",
"table": "customers",
"column": null
},
"instruction_count": 17,
"scenario_keys": [
"ai.inference",
"ai.training",
"purpose.allowed_use",
"purpose.prohibited_use",
"residency.cross_border_transfer"
]
},
{
"ref": {
"database": "acmecloud_demo",
"schema": "public",
"table": "customers",
"column": "email"
},
"instruction_count": 1,
"scenario_keys": ["masking.display"]
},
{
"ref": {
"database": "acmecloud_demo",
"schema": "public",
"table": "support_tickets",
"column": null
},
"instruction_count": 14,
"scenario_keys": ["ai.training", "purpose.prohibited_use", "sharing.internal"]
}
],
"publication": {
"publication_id": "accef000-0000-4000-8000-000000000001",
"published_at": "2026-07-16T00:00:00.000Z"
}
}
Note that acmecloud_demo.public.legacy_customer_backup — a table in the sample estate with no governing policy — does not appear: discover_context lists governed scopes from published instruction state, not the full catalog.
Limits and notesDirect link to Limits and notes
- Unsupported filters refuse explicitly. Providing
domain,sensitivity,pii, orcompliance_tagreturns anot_supportederror. These filters are part of the input schema but are not backed by published instruction context facts on the current read surface. The refusal is deliberate: a filter is never silently ignored, so you never mistake an unfiltered list for a filtered one. - Filters are exact matches.
databaseandschemacompare against normalized (lowercase) catalog names; there is no pattern or prefix matching. A filter that matches nothing returnsansweredwith an emptyassetsarray — distinct fromnot_enough_published_state, which means there is no publication or no instruction state at all. - Metering. Every call that passes input validation consumes one MCP call from your plan's metered allowance before any read happens; over quota, the call fails with
quota_exceeded. A call rejected withinvalid_parametersis not metered. See Plans. - Error codes. Failures outside the typed answer states are redacted errors returned with
isError: trueand a body of the form{"error": {"code", "message"}}:invalid_parameters,not_supported,read_failed,unauthorized,auth_unavailable,rate_limited,quota_exceeded. - Current publication only. Draft policies, approved-but-unpublished changes, and pending deployment plans never appear. Publish a deployment to change what this tool reports; see Deployments.
RelatedDirect link to Related
get_decision_context— instruction decisions for one discovered assetinspect_data_meaning— meaning and classification facts for one asset- MCP server overview — the seven tools and the read surface
- Typed answer states — the full three-state model
- Scenarios — the canonical scenario key vocabulary
- MCP schemas — full input and output schema reference