get_org_admin_by_orgid_roles
Calls GET /api/org-admin/{orgId}/roles as the signed-in person · REST reference
The organization's roles and what each grants
With the caller's own token; requires admin.roles.view in the organization.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
orgIdpath | string (uuid) | required |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_org_admin_by_orgid_roles",
"arguments": {
"orgId": "11111111-1111-4111-8111-111111111111"
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The organization's live roles, built-in ones first.
{
"data": [
{
"editable": true,
"grants": [],
"groupCount": 1,
"id": "11111111-1111-4111-8111-111111111111",
"name": "string",
"orgId": "11111111-1111-4111-8111-111111111111",
"code": "string",
"description": "string"
}
],
"success": true
}Fields
| Field | Type | Description |
|---|---|---|
data | array of object | |
data[].code | string | null | OWNER or ORG_USER for the two built-in roles; null for a role the organization made. |
data[].description | string | null | |
data[].editable | boolean | False for the built-in roles — OWNER holds exactly the type's entitlements, ORG_USER exactly the read-only baseline — and for a role this organization does not own. |
data[].grants | array of object | |
data[].grants[].category | string | |
data[].grants[].description | string | |
data[].grants[].feature | string | The catalog feature id, e.g. hospital.vouchers.redeem |
data[].grants[].id | string (uuid) | |
data[].grants[].name | string | |
data[].grants[].orgId | string (uuid) | |
data[].grants[].riskLevel | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | |
data[].groupCount | integer | |
data[].id | string (uuid) | |
data[].name | string | |
data[].orgId | string (uuid) | |
success | true |
When it fails
A failed call returns isError: true with the API's message as text.
400The request was malformed or failed a guard.
403Authenticated, but the caller holds none of the required permissions.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "get_org_admin_by_orgid_roles",
"description": "GET /api/org-admin/{orgId}/roles — With the caller's own token; requires `admin.roles.view` in the organization.",
"inputSchema": {
"type": "object",
"properties": {
"orgId": {
"type": "string"
}
},
"required": [
"orgId"
]
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}