Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_organization_role

Retrieve role details and permissions for users in Alibaba Cloud DevOps organizations to manage access control and team responsibilities.

Instructions

[Organization Management] Get information about an organization role

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID
roleIdYesRole ID

Implementation Reference

  • Tool handler implementation: parses input arguments using the schema, calls the core getOrganizationRoleFunc, and returns the role as JSON string.
    case "get_organization_role": { const args = types.GetOrganizationRoleSchema.parse(request.params.arguments); const role = await organization.getOrganizationRoleFunc( args.organizationId, args.roleId ); return { content: [{ type: "text", text: JSON.stringify(role, null, 2)}] } }
  • Core helper function that makes the API request to fetch the organization role and parses the response with OrganizationRoleSchema.
    export async function getOrganizationRoleFunc( organizationId: string, roleId: string ): Promise<z.infer<typeof OrganizationRoleSchema>> { const url = `/oapi/v1/platform/organizations/${organizationId}/roles/${roleId}`; const response = await yunxiaoRequest(url, { method: "GET" }); return OrganizationRoleSchema.parse(response); }
  • Tool registration defining the name, description, and input schema.
    name: "get_organization_role", description: "[Organization Management] Get information about an organization role", inputSchema: zodToJsonSchema(types.GetOrganizationRoleSchema), },
  • Input schema for the tool defining organizationId and roleId parameters.
    export const GetOrganizationRoleSchema = z.object({ organizationId: z.string().describe("Organization ID"), roleId: z.string().describe("Role ID") });
  • Output schema defining the structure of the organization role object.
    export const OrganizationRoleSchema = z.object({ id: z.string().describe("Role ID"), name: z.string().describe("Role name"), organizationId: z.string().describe("Organization ID"), permissions: z.array(z.string()).describe("Role permission list") });

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/aliyun/alibabacloud-devops-mcp-server'

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