Agentra LabsAgentra Labs DocsPublic Documentation

AgenticContract

MCP Tools

Complete reference for AgenticContract MCP tools

AgenticContract exposes 22 core tools and 16 advanced tools via the Model Context Protocol.

Contract Tools

contract_create

Create a new contract between agents or agent and user.

ParameterTypeRequiredDescription
namestringYesContract name
partiesstring[]YesList of party identifiers
descriptionstringNoContract description

Returns: Contract ID and creation timestamp.

contract_sign

Sign a contract to indicate acceptance.

ParameterTypeRequiredDescription
contract_idstringYesContract to sign
signerstringYesIdentity of the signer

Returns: Signature confirmation.

contract_verify

Verify a contract's validity and signature chain.

ParameterTypeRequiredDescription
contract_idstringYesContract to verify

Returns: Validity status and signature details.

contract_list

List contracts with optional status filter.

ParameterTypeRequiredDescription
statusstringNoFilter: active, expired, all

Returns: Array of contract summaries.

contract_get

Get a specific contract by ID.

ParameterTypeRequiredDescription
contract_idstringYesContract ID

Returns: Full contract details.

Policy Tools

policy_add

Add a policy rule governing agent behavior.

ParameterTypeRequiredDescription
labelstringYesHuman-readable policy name
scopestringYesglobal, session, or agent
actionstringYesallow, deny, require_approval, or audit_only
descriptionstringNoDetailed policy description
tagsstring[]NoCategorization tags
conditionsstring[]NoPrerequisite condition labels

Returns: Policy ID.

policy_check

Check if an action is allowed under current policies.

ParameterTypeRequiredDescription
actionstringYesDescription of the intended action
scopestringNoFilter to specific scope

Returns: Policy action (allow, deny, require_approval, audit_only) and matching policy details.

policy_list

List active policies with optional scope filter.

ParameterTypeRequiredDescription
scopestringNoFilter: global, session, agent

Returns: Array of policy objects with ID, label, scope, action, and tags.

Risk Limit Tools

risk_limit_set

Set a risk limit threshold for a resource or action.

ParameterTypeRequiredDescription
labelstringYesLimit name
max_valuenumberYesMaximum allowed value
limit_typestringYesrate, threshold, budget, or count
window_secsnumberNoTime window in seconds (for rate limits)

Returns: Risk limit ID.

risk_limit_check

Check if an action would exceed risk limits.

ParameterTypeRequiredDescription
labelstringYesLimit to check against
amountnumberYesProposed usage amount

Returns: Whether the limit would be exceeded, current usage, remaining capacity.

risk_limit_list

List all risk limits with current values.

Returns: Array of risk limits with ID, label, type, current value, max value, and usage ratio.

Approval Tools

approval_request

Request approval for a controlled action.

ParameterTypeRequiredDescription
rule_idstringYesApproval rule that triggered this
action_descriptionstringYesWhat the agent wants to do
requestorstringYesWho is requesting

Returns: Approval request ID with pending status.

approval_decide

Approve or deny a pending approval request.

ParameterTypeRequiredDescription
request_idstringYesRequest to decide
decisionstringYesapprove or deny
deciderstringYesWho is deciding
reasonstringYesJustification

Returns: Decision ID and updated request status.

approval_list

List approval requests with optional status filter.

ParameterTypeRequiredDescription
statusstringNoFilter: pending, approved, denied, expired

Returns: Array of approval requests.

Condition Tools

condition_add

Add a conditional execution rule.

ParameterTypeRequiredDescription
labelstringYesCondition name
condition_typestringYesthreshold, time_based, dependency, or custom
expressionstringYesCondition expression

Returns: Condition ID.

condition_evaluate

Evaluate whether conditions are met for an action.

ParameterTypeRequiredDescription
condition_idstringYesCondition to evaluate

Returns: Whether the condition is met, with status and last evaluation result.

Obligation Tools

obligation_add

Add an obligation that an agent must fulfill.

ParameterTypeRequiredDescription
labelstringYesObligation name
descriptionstringYesDetailed description
assigneestringYesResponsible agent/user
deadlinestringNoISO 8601 deadline

Returns: Obligation ID.

obligation_check

Check the status of obligations.

ParameterTypeRequiredDescription
assigneestringNoFilter by assignee
statusstringNoFilter: pending, fulfilled, overdue, waived

Returns: Array of obligations, with overdue items flagged.

Violation Tools

violation_report

Report a contract or policy violation.

ParameterTypeRequiredDescription
descriptionstringYesWhat happened
severitystringYesinfo, warning, critical, or fatal
actorstringYesWho committed the violation
policy_idstringNoRelated policy ID
contextobjectNoAdditional JSON context

Returns: Violation ID with timestamp.

violation_list

List recorded violations with optional severity filter.

ParameterTypeRequiredDescription
severitystringNoMinimum severity filter
actorstringNoFilter by actor

Returns: Array of violation records.

Context and Stats Tools

contract_context_log

Log the intent and context behind a contract action.

ParameterTypeRequiredDescription
intentstringYesWhy the action is being taken
topicstringNoCategory (e.g., "compliance", "risk")
decisionstringNoWhat was concluded

Returns: Confirmation of logged context.

contract_stats

Get summary statistics for the contract store.

Returns: Counts for all entity types, file size, last modified timestamp.

Error Handling

All tool errors are returned as MCP content with isError: true:

{
  "content": [{"type": "text", "text": "Error: Policy not found"}],
  "isError": true
}

Unknown tools return JSON-RPC error code -32803 (TOOL_NOT_FOUND).