← AI

Authorization for custom actions

Apply signing rules to structured requests from your own tools and services.

Typed JSON requests

Define the fields and types for an MCP tool call or an API command. Check the operation and its arguments, and decide which requests need approval.

Integration guide
MCP tool callTool name and arguments
{
  "method": "tools/call",
  "params": {
    "name": "my-tool-call",
    "arguments": {
      "arg1": "value-1",
      "arg2": 250
    }
  }
}
Edict exampleshowcase-custom.edict
authority "showcase-custom" {
    intent = "custom"
    version = "1"

    struct ToolArguments {
        arg1: Text
        arg2: Integer
    }

    struct ToolCall {
        name: Text
        arguments: ToolArguments
    }

    input request {
        method: Text
        params: ToolCall
    }

    approver operator {
        type = "reference"
        id = "operator"
        ref = "operator@sha256:<digest>"
    }

    policy "mcp-tool-call" {
        allow when {
            request.method == "tools/call"
            request.params.name == "my-tool-call"
            request.params.arguments.arg1 in ["value-1", "value-2"]
            request.params.arguments.arg2 > 0
            request.params.arguments.arg2 <= 1000
        }

        require operator if (request.params.arguments.arg2 > 100)
    }
}