get_role
Retrieve detailed information about a specific BookStack role, including its permissions and configuration settings, by providing the role ID.
Instructions
Get details of a specific role including permissions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Role ID |
Implementation Reference
- src/tools/search-user-tools.ts:428-432 (handler)Handler logic for the 'get_role' tool: parses the role ID from input arguments, calls BookStackClient.getRole(id), and returns a formatted API response.case "get_role": { const id = parseInteger(args.id); const result = await client.getRole(id); return formatApiResponse(result); }
- Input schema definition for the 'get_role' tool, requiring a numeric 'id' parameter for the role.{ name: "get_role", description: "Get details of a specific role including permissions", inputSchema: { type: "object", properties: { id: { type: "number", description: "Role ID" }, }, required: ["id"], }, },
- src/index.ts:103-122 (registration)Registration of the 'get_role' tool name in the array used to dispatch calls to the search-user-tools handler.const searchUserToolNames = [ "search_all", "list_users", "get_user", "create_user", "update_user", "delete_user", "list_roles", "get_role", "create_role", "update_role", "delete_role", "list_attachments", "get_attachment", "delete_attachment", "list_images", "get_image", "update_image", "delete_image", ];
- src/lib/bookstack-client.ts:315-318 (helper)Supporting utility in BookStackClient: makes the API GET request to retrieve role details by ID.async getRole(id: number): Promise<Role> { const response: AxiosResponse<Role> = await this.api.get(`/roles/${id}`); return response.data; }