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_relationshipstringThe agent's claimed relationship to the task.

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.

If the response is pending, continue polling with get_approval_status. Proceed only after approved.

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.

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. Execute only after every enabled control permits it.
  5. Call record_action_effect after execution when Task Guard effect reporting is enabled.

Task Guard inline confirmation does not replace Govern approval.

Maetra AI DocsGovern agents before they act.