Maetra.ioStart free

Tools reference

The Maetra MCP server exposes a capability-dependent tool set. Call tools/list to discover the tools available to the current workspace and API key.

Invoke a tool with tools/call:

JSON
{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "tools/call",
  "params": {
    "name": "check_task_alignment",
    "arguments": {
      "mcp_access_token": "<token from get_mcp_access>",
      "session_ref": "conversation_01JY8Q",
      "action": "Edit the refund approval route"
    }
  }
}

Access preflight#

get_mcp_access

Required first call for every new user turn or work cycle, after context compaction or restart, and whenever Maetra requests an access refresh. No arguments.

The response contains:

FieldDescription
workspaceWorkspace ID, MCP enabled state, and configuration version.
capabilitiesEnabled state, reason, and allowed tools for Secure, Govern, and Task Guard.
required_behaviorRuntime instructions the host must follow.
mcp_access_tokenShort-lived token required by every capability tool.
expires_atAccess-token expiry.
JSON
{
  "name": "get_mcp_access",
  "arguments": {}
}

Note Every tool below requires an additional string argument, mcp_access_token, containing the current token returned by get_mcp_access.

Task Guard tools#

start_task

Start or transition to the current user-authorized Task Guard task.

ArgumentTypeRequiredDescription
session_refstringStable host conversation or session reference.
objectivestringThe direct user's current objective.
idempotency_keystringStable retry key for the task start.
titlestringShort task title.
agent_name / agent_idstringAgent identity.
constraints, decisionsstring[]User constraints and agreed decisions.
success_criteriastring[]Observable completion conditions.
in_scope, out_of_scopestring[]Explicit task boundaries.
open_questionsstring[]Unresolved questions.
direct_user_event_idstringRequired for a later task or contract revision in the same session.
host_typestringCODEX, CLAUDE, CUSTOM_MCP, or CUSTOM_API.
integration_modestringADVISORY or ENFORCED.
confirmation_capablebooleanWhether the host can ask the session user inline.
effect_reporting_capablebooleanWhether the host can report actual effects.

After starting, retain task.id, contract_version, and the returned anchor.

get_task_context

Retrieve the active Task Guard contract after turn start, compaction, restart, or when context may be stale.

ArgumentTypeRequired
session_refstring

check_task_alignment

Check a proposed material action against the active task before executing it.

ArgumentTypeRequiredDescription
session_refstringStable session reference.
actionstringConcise proposed action.
action_typestringCategory such as edit, read, send, create, or execute.
targetstringFile, system, person, artifact, or other target.
effectsstring[]Expected direct and connected effects.
rationalestringWhy the action supports the task.
current_stepstringCurrent task step.
contract_versionnumberLast contract version fetched by the host.
external_action_idstringStable host action ID used to bind effect reporting.
idempotency_keystringStable retry key.
effectstringREAD, SEARCH, CREATE, MODIFY, DELETE, COMMUNICATE, PUBLISH, EXECUTE, PURCHASE, TRANSFER, GRANT_ACCESS, REVOKE_ACCESS, MOVE_DATA, SCHEDULE, or OTHER.
tool_name, operationstringTool and operation being checked.
resource, destinationobjectStructured target and destination metadata.
data_classesstring[]Data classifications involved.
reversiblebooleanWhether the action can be undone.
estimated_costnumberEstimated monetary cost.
provenancestringHOST_VERIFIED, TOOL_ADAPTER_VERIFIED, CONNECTOR_VERIFIED, AGENT_ASSERTED, or UNVERIFIED.
claimed_relationshipstringHow the action supports the task: DIRECT, REQUIRED_DEPENDENCY, COMPATIBILITY_REPAIR, VERIFICATION, SUPPORTING_RESEARCH, SUPPORTING_COORDINATION, INCIDENTAL_CLEANUP, OPTIONAL_IMPROVEMENT, OBJECTIVE_CHANGE, UNRELATED, or UNKNOWN.

Follow the returned verdict and next_action exactly. See Alignment verdicts.

explain_task_relationship

Provide bounded evidence when check_task_alignment returns NEEDS_EXPLANATION.

ArgumentTypeRequired
check_idstring
relationshipstring
evidencestring[]

The response is a new alignment decision. Follow its verdict.

record_task_progress

Record a compact milestone for the active task.

ArgumentTypeRequired
session_refstring
summarystring
idempotency_keystring
completed, next_stepsstring[]
new_dependencies, open_questionsstring[]
current_stepstring

Check every new_dependencies item with check_task_alignment before acting on it.

record_action_effect

Report what a previously checked action actually changed.

ArgumentTypeRequired
check_idstring
actual_effectsstring[]
actual_effectstring
affected_resourcesobject[]
result_reference, artifact_hashstring
summary, validation_outcomestring

If effect_aligned is false, stop expanding the work and ask the session user inline.

complete_task

Complete the active Task Guard task when the objective and success criteria are satisfied.

ArgumentTypeRequired
session_refstring
summarystring
completion_event_idstring

Secure tools#

check_action

Scan an AI-agent prompt, tool call, or output with Maetra Secure. Backs POST /v1/secure/scan.

ArgumentTypeRequiredDescription
contentstringPrompt, tool payload, or output to scan.
scan_typestringprompt_input (default), tool_call, or output.
tool_namestring✓ if tool_callTool being called.
agent_id, agent_namestringAgent identity.
contextobjectStructured context.

Honor safe, flagged, or blocked before continuing.

list_active_rules

List active Secure rules. No arguments beyond mcp_access_token.

create_rule

Create a Secure rule. New rules default to draft.

ArgumentTypeRequiredDescription
namestringRule name.
typestringdata_pattern, policy_dsl, prompt_pattern, or tool_call.
actionstringblock, flag, or log.
severitystringcritical, high, medium, or low.
statusstringactive, archived, or draft.
applies_to_allbooleanDefaults to true.
data_directionstringinbound, outbound, or both.
custom_patterns, tool_names, data_categories, data_descriptions, dsl_statements, pattern_library_ids, agent_idsstring[]Rule-specific values.

update_rule

Update an existing Secure rule by ID. id is required; every create-rule field is optional and only submitted fields change.

Govern tools#

request_approval

Request a Govern checkpoint before a consequential action. Backs POST /v1/checkpoints.

ArgumentTypeRequiredDescription
actionstringAction name.
payloadobjectStructured action details.
agent_id, agent_namestringAgent identity.
context, reasoningstringReviewer context and agent reasoning.
autonomy_levelstringL0L5.
policy_ids, policy_group_idsstring[]Restrict evaluation.
timeout_secondsnumberWall-clock ceiling for a human decision.
idempotency_keystringStable retry key for creating the checkpoint.
targetobjectExact account, resource, destination, or external system. Required for execution authorization.
task_authorizationobjectTask authority containing task_id, revision_id, and external_action_id. Required for execution authorization.
runtimeobjectVersioned tool or model identity. Required for execution authorization.
executor_audiencestringIntended executor identity. Defaults to maetra-executor.

If the response is pending, continue polling with get_approval_status. An approved response is the decision; call authorize_execution immediately before the external action to consume that approval once.

An approved response includes the signed decisionToken, canonical actionEnvelope, actionEnvelopeHash, policyDigest, exact policyVersions, token lifecycle timestamps, and the expected execution and effect deadlines. Maetra carries these fields into the MCP execution tools automatically when you provide the checkpoint ID.

get_approval_status

Long-poll a Govern checkpoint.

ArgumentTypeRequired
checkpoint_idstring
wait_secondsnumber

Poll until approved, rejected, expired, blocked, or cancelled.

list_active_policies

List active Govern policies, including whether each uses exact rules or decision intelligence. No arguments beyond mcp_access_token.

authorize_execution

Consume an approved decision capability once, immediately before the exact provider request. Maetra reloads the checkpoint, verifies its signed decision and canonical action envelope, and creates a signed execution receipt.

ArgumentTypeRequiredDescription
checkpoint_idstringApproved checkpoint returned by request_approval.
idempotency_keystringStable key for this exact execution. An identical retry returns the existing authorization.
providerstringExternal provider or system receiving the request.
operationstringProvider operation, such as refunds.create.
requestJSONNormalized downstream request that will be sent after authorization.

Do not call the provider first. A changed request, wrong executor, expired or revoked decision, or second independent use fails. Provider retries remain possible under the returned executionId.

record_execution_attempt

Append one immutable provider attempt to the authorized execution. Record successes, failures, timeouts, and retries against the same execution_id.

ArgumentTypeRequiredDescription
execution_idstringID returned by authorize_execution.
attempt_numbernumberPositive attempt sequence, starting at 1.
requestJSONRequest sent for this provider attempt.
responseJSONProvider response, when available.
statusstringsucceeded, failed, or unknown.
started_atstringISO 8601 provider-start time.
completed_atstringISO 8601 completion time, when known.
provider_status, provider_transaction_id, error_classstringProvider reconciliation details.

A failed or unknown attempt does not consume another decision. Retry only the identical authorized action, then record the next attempt number.

record_execution_effect

Append the state observed after execution. This connects the approved action and provider attempt to what actually changed.

ArgumentTypeRequiredDescription
execution_idstringAuthorized execution being verified.
observationJSONExternal state observed after execution.
observed_atstringISO 8601 observation time.
verification_methodstringprovider_signed, ledger_readback, hardware_attested, stake_backed, task_guard, or self_reported.
verification_statusstringverified, mismatch, or unverified; defaults to unverified.
proofJSONMethod-specific proof.
provider, external_reference, task_guard_effect_report_idstringReconciliation links.

Self-reported observations remain labelled unverified. Independent verification methods require their configured verifier to validate the proof; the caller cannot turn an unverified observation into a verified receipt by setting a boolean.

Ordering multiple controls#

For the same material action:

  1. Call check_task_alignment when Task Guard is enabled.
  2. Call check_action before processing untrusted content or executing the tool call.
  3. Call request_approval before the external action when Govern is enabled.
  4. Poll until the decision is terminal; stop unless it is approved.
  5. Call authorize_execution immediately before the exact provider request.
  6. Execute only after authorization succeeds, then call record_execution_attempt for every provider attempt.
  7. Call record_execution_effect with the resulting observed state.
  8. Call record_action_effect when Task Guard effect reporting is enabled.

Task Guard inline confirmation does not replace Govern approval, and Govern approval does not replace one-use execution authorization.

Maetra AI DocsGovern agents before they act.