{
  "tools": {
    "read_finance_documents": {
      "label": "Read finance documents",
      "user_request": "Show me the finance workspace documents.",
      "method": "GET",
      "endpoint": "/api/spaces/finance/documents",
      "required_permission": "space.read",
      "network_permission": "network:finance-workspace-api",
      "impact": "low",
      "approval_required": false,
      "description": "Read protected finance workspace documents.",
      "schema": {
        "type": "object",
        "properties": {
          "titleFilter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional exact/normalized title to filter by."
          }
        },
        "required": []
      }
    },
    "create_finance_document": {
      "label": "Create finance document",
      "user_request": "Create a new finance memo in the finance workspace.",
      "method": "POST",
      "endpoint": "/api/spaces/finance/documents",
      "required_permission": "space.write",
      "network_permission": "network:finance-workspace-api",
      "impact": "low",
      "approval_required": false,
      "body": {
        "title": "Agent-generated finance memo",
        "content": "Generated by the agent through the Permission Harness Client. No human approval required for document generation."
      },
      "description": "Generate a new finance document. Low impact in this demo; no human approval required.",
      "schema": {
        "type": "object",
        "properties": {
          "documentTitle": {
            "type": "string"
          },
          "documentContent": {
            "type": "string"
          }
        },
        "required": [
          "documentTitle",
          "documentContent"
        ]
      }
    },
    "delete_finance_document": {
      "label": "Delete finance document",
      "user_request": "Delete finance document fin-1 from the finance workspace.",
      "method": "DELETE",
      "endpoint": "/api/spaces/finance/documents/fin-1",
      "required_permission": "space.delete",
      "network_permission": "network:finance-workspace-api",
      "impact": "high",
      "approval_required": true,
      "description": "Delete a finance document. High impact; requires approval.",
      "schema": {
        "type": "object",
        "properties": {
          "docId": {
            "type": "string",
            "default": "fin-1"
          }
        },
        "required": [
          "docId"
        ]
      }
    },
    "execute_payment": {
      "label": "Execute payment",
      "user_request": "Pay CHF 100 to Example Vendor.",
      "method": "POST",
      "endpoint": "/api/payments",
      "required_permission": "payment.execute",
      "network_permission": "network:finance-workspace-api",
      "impact": "high",
      "approval_required": true,
      "body": {
        "amount": 100,
        "currency": "CHF",
        "recipient": "Example Vendor"
      },
      "description": "Simulate payment execution. High impact; requires approval and permission.",
      "schema": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "recipient": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "recipient"
        ]
      }
    },
    "web_scrape": {
      "label": "Read webpage",
      "user_request": "Read a public webpage and summarize it.",
      "method": "GET",
      "endpoint": "external-web",
      "required_permission": "web.read",
      "network_permission": "network:public-web",
      "impact": "low",
      "approval_required": false,
      "description": "Fetch and extract text from a public webpage. Allowed by default through local harness policy.",
      "schema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          }
        },
        "required": [
          "url"
        ]
      }
    }
  },
  "permissions": {
    "space.read": {
      "label": "Read finance space",
      "scope": "vc",
      "description": "Read documents in delegated finance spaces."
    },
    "space.write": {
      "label": "Write finance space",
      "scope": "vc",
      "description": "Create documents in delegated finance spaces."
    },
    "space.delete": {
      "label": "Delete finance documents",
      "scope": "vc",
      "description": "Delete finance documents."
    },
    "payment.execute": {
      "label": "Execute payment",
      "scope": "vc",
      "description": "Execute payments through Finance API."
    },
    "web.read": {
      "label": "Read public web",
      "scope": "local",
      "description": "Read public webpages."
    },
    "network:finance-workspace-api": {
      "label": "Finance API network",
      "scope": "local",
      "description": "Allow calls to the Finance Workspace API."
    },
    "network:public-web": {
      "label": "Public web network",
      "scope": "local",
      "description": "Allow outbound public-web reads."
    },
    "tool:read_finance_documents": {
      "label": "Use read_finance_documents",
      "scope": "local",
      "description": "Allow execution of tool read_finance_documents."
    },
    "tool:create_finance_document": {
      "label": "Use create_finance_document",
      "scope": "local",
      "description": "Allow execution of tool create_finance_document."
    },
    "tool:delete_finance_document": {
      "label": "Use delete_finance_document",
      "scope": "local",
      "description": "Allow execution of tool delete_finance_document."
    },
    "tool:execute_payment": {
      "label": "Use execute_payment",
      "scope": "local",
      "description": "Allow execution of tool execute_payment."
    },
    "tool:web_scrape": {
      "label": "Use web_scrape",
      "scope": "local",
      "description": "Allow execution of tool web_scrape."
    }
  },
  "agents": {
    "reader": {
      "label": "Reader subagent",
      "task": "read-finance-documents-only",
      "parentTask": "finance-workspace-document-review",
      "vcPermissions": [
        "space.read",
        "space.write"
      ],
      "leafVcPermissions": [
        "space.read"
      ],
      "localGrants": [
        "network:finance-workspace-api",
        "tool:read_finance_documents",
        "tool:create_finance_document"
      ],
      "leafLocalGrants": [
        "network:finance-workspace-api",
        "tool:read_finance_documents"
      ]
    },
    "operator": {
      "label": "Operator subagent",
      "task": "approved-finance-document-writer",
      "parentTask": "finance-workspace-operations",
      "vcPermissions": [
        "space.read",
        "space.write"
      ],
      "leafVcPermissions": [
        "space.read",
        "space.write"
      ],
      "localGrants": [
        "network:finance-workspace-api",
        "tool:read_finance_documents",
        "tool:create_finance_document"
      ],
      "leafLocalGrants": [
        "network:finance-workspace-api",
        "tool:read_finance_documents",
        "tool:create_finance_document"
      ]
    },
    "payment_operator": {
      "label": "Payment execution subagent",
      "task": "approved-payment-execution-only",
      "parentTask": "finance-workspace-payments",
      "vcPermissions": [
        "payment.execute"
      ],
      "leafVcPermissions": [
        "payment.execute"
      ],
      "localGrants": [
        "network:finance-workspace-api",
        "tool:execute_payment"
      ],
      "leafLocalGrants": [
        "network:finance-workspace-api",
        "tool:execute_payment"
      ]
    },
    "document_deleter": {
      "label": "Document deletion subagent",
      "task": "approved-document-deletion-only",
      "parentTask": "finance-workspace-document-deletion",
      "vcPermissions": [
        "space.delete"
      ],
      "leafVcPermissions": [
        "space.delete"
      ],
      "localGrants": [
        "network:finance-workspace-api",
        "tool:delete_finance_document"
      ],
      "leafLocalGrants": [
        "network:finance-workspace-api",
        "tool:delete_finance_document"
      ]
    },
    "web_reader": {
      "label": "Public web leaf subagent",
      "task": "read-public-webpage",
      "parentTask": "public-web-research",
      "vcPermissions": [
        "web.read"
      ],
      "leafVcPermissions": [
        "web.read"
      ],
      "localGrants": [
        "network:public-web",
        "tool:web_scrape"
      ],
      "leafLocalGrants": [
        "network:public-web",
        "tool:web_scrape"
      ],
      "localOnly": true
    }
  }
}