{
  "$comment": "Qlaas DMI operator example · leave_message. Shapes match UIE-founder/qlaas-dmi test/agentline.test.ts and test/oauth.test.ts (1 Oct 2026). Default mandate: ALLOW. Delivered to the owner's inbox marked as from an agent; nothing rings.",
  "endpoints": {
    "mcp": "https://dmi.qlaas.co.uk/agentline/mcp",
    "a2a": "https://dmi.qlaas.co.uk/agentline/a2a"
  },
  "headers": {
    "content-type": "application/json",
    "authorization": "Bearer <access_token> (optional; without it the caller is tier declared)"
  },
  "inputSchema": {
    "type": "object",
    "required": [
      "text"
    ],
    "properties": {
      "text": {
        "type": "string",
        "maxLength": 2000
      },
      "from": {
        "type": "string"
      },
      "onBehalfOf": {
        "type": "string"
      },
      "callback": {
        "type": "string"
      }
    }
  },
  "mcp": {
    "request": {
      "jsonrpc": "2.0",
      "id": 3,
      "method": "tools/call",
      "params": {
        "name": "leave_message",
        "arguments": {
          "text": "Jordan would like to catch up next week.",
          "onBehalfOf": "Jordan Lee"
        },
        "_meta": {
          "agent": {
            "vendor": "meta-muse",
            "name": "Muse",
            "onBehalfOf": "Jordan Lee"
          }
        }
      }
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 3,
      "result": {
        "content": [
          {
            "type": "text",
            "text": "Done: {\"delivered\":true,\"ref\":\"msg_Qw9eRt7yUi3o\"}"
          }
        ],
        "structuredContent": {
          "taskId": "task_Ab12Cd34Ef56",
          "state": "completed",
          "decision": "ALLOW",
          "result": {
            "delivered": true,
            "ref": "msg_Qw9eRt7yUi3o"
          },
          "receipts": [
            "rcpt_Ab12Cd34Ef56"
          ]
        },
        "isError": false
      }
    }
  },
  "a2a": {
    "request": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "message/send",
      "params": {
        "message": {
          "role": "user",
          "messageId": "m1",
          "parts": [
            {
              "kind": "data",
              "data": {
                "skill": "leave_message",
                "args": {
                  "text": "Jordan would like to catch up next week."
                }
              }
            }
          ],
          "metadata": {
            "agent": {
              "vendor": "meta-muse",
              "name": "Muse",
              "onBehalfOf": "Jordan Lee"
            }
          }
        }
      }
    },
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "kind": "task",
        "id": "task_Ab12Cd34Ef56",
        "contextId": "ctx_Hq7LmP3vKd9x",
        "status": {
          "state": "completed",
          "message": {
            "role": "agent",
            "parts": [
              {
                "kind": "text",
                "text": "Done."
              }
            ]
          }
        },
        "artifacts": [
          {
            "artifactId": "task_Ab12Cd34Ef56-result",
            "parts": [
              {
                "kind": "data",
                "data": {
                  "delivered": true,
                  "ref": "msg_Qw9eRt7yUi3o"
                }
              }
            ]
          }
        ],
        "metadata": {
          "decision": "ALLOW",
          "receipts": [
            "rcpt_Ab12Cd34Ef56"
          ]
        }
      }
    }
  },
  "a2aTextOnly": {
    "$comment": "A message with only a text part becomes leave_message. Free text is a message to the owner, never an instruction to the line.",
    "request": {
      "jsonrpc": "2.0",
      "id": 2,
      "method": "SendMessage",
      "params": {
        "message": {
          "parts": [
            {
              "kind": "text",
              "text": "Jordan would like to catch up next week."
            }
          ]
        }
      }
    }
  },
  "rateLimit": {
    "$comment": "6th message from the same declared caller inside 10 minutes (30 when verified).",
    "response": {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "kind": "task",
        "id": "task_Zz98Yy76Xx54",
        "contextId": "ctx_Hq7LmP3vKd9x",
        "status": {
          "state": "rejected",
          "message": {
            "role": "agent",
            "parts": [
              {
                "kind": "text",
                "text": "Not permitted: too many messages from this caller recently; try again later"
              }
            ]
          }
        },
        "artifacts": [],
        "metadata": {
          "decision": "DENY",
          "receipts": [
            "rcpt_Zz98Yy76Xx54"
          ]
        }
      }
    }
  }
}
