Skip to main content
Glama

get_role

Retrieve detailed information about a specific BookStack role, including its permissions and access levels, by providing the role ID.

Instructions

Get details of a specific role including permissions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesRole ID

Implementation Reference

  • The handler function that executes the 'get_role' tool logic: parses the 'id' argument, calls the BookStack client's getRole method, and formats the result as an API response.
    case "get_role": { const id = parseInteger(args.id); const result = await client.getRole(id); return formatApiResponse(result); }
  • The tool metadata definition including name, description, and input schema specifying a required numeric 'id' parameter for validation.
    { 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:56-66 (registration)
    Registers the 'get_role' tool (via createSearchAndUserTools) in the allTools array, which is returned by the list tools handler to MCP clients.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ]; // List tools handler server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });
  • Supporting utility in BookStackClient that makes the HTTP GET request to fetch role details by ID from the BookStack API.
    async getRole(id: number): Promise<Role> { const response: AxiosResponse<Role> = await this.api.get(`/roles/${id}`); return response.data; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lautarobarba/bookstack_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server