agentsecure.request_approval
Create a local pending approval record when a Mesh policy hint needs human review, returning an approval ID and pending status; decisions happen outside these MCP tools.
Instructions
Create a local pending approval record when a Mesh policy hint requires human review. Returns an approval object with approval_id, status=pending, requested_by, action, resource, required_approver, and timestamps; reason is redacted with a summary/hash. Writes local state and audit but does not send a message, notify a human, execute the action, or change policy. Repeated calls create separate requests. Use agentsecure.get_approval_status with the returned ID; approval decisions are made outside these MCP tools. An approved record does not automatically unblock policy. Example: {"requested_by": "frontend-agent", "action": "deploy_preview", "reason": "Please review the preview deployment."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Non-empty proposed action label, e.g. deploy_preview; use the same action supplied to get_policy_hint. Records intent only and does not execute it. | |
| reason | Yes | Justification to summarize/hash. Stored reason is [redacted], but up to 120 characters can remain in a heuristic summary. Do not include secrets. | |
| resource | No | Optional resource metadata; defaults to {}. Stored/returned fields are limited to action, environment, id, path, provider, repo, team, and type. Use non-secret scalar values or lists; other keys and top-level object-valued fields are dropped; list items are converted to scalars, and strings are truncated/redacted. Example: {"type": "code_file", "path": "src/app.py"}. For policy checks, the entire supplied object is examined for sensitive-action markers. | |
| requested_by | Yes | Non-empty Mesh agent ID, e.g. backend-agent. Pass this session's AGENTSECURE_AGENT_ID value when set; it is not read automatically. IDs are caller-supplied local labels, not authentication credentials. | |
| required_approver | No | Optional approver metadata, e.g. {"type": "team", "id": "platform"}. Omitted/empty selects resource.team, then security team for a case-sensitive action containing security/secret, else human local-owner. Stored as supplied; use only non-secret labels. Does not authenticate an approver. |