Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_organization_department_info

Retrieve department details within an organization on Alibaba Cloud DevOps platform using organization and department IDs.

Instructions

Get information about a department in an organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID
idYesDepartment ID

Implementation Reference

  • Tool handler that parses input arguments using the schema, calls the core getOrganizationDepartmentInfoFunc with organizationId and department id, and returns the result as JSON stringified text content.
    case "get_organization_department_info": { const args = types.GetOrganizationDepartmentInfoSchema.parse(request.params.arguments); const departmentInfo = await organization.getOrganizationDepartmentInfoFunc( args.organizationId, args.id ) return { content: [{ type: "text", text: JSON.stringify(departmentInfo, null, 2) }], }; }
  • Zod schema defining the input parameters for the tool: organizationId (string) and id (department ID, string).
    export const GetOrganizationDepartmentInfoSchema = z.object({ organizationId: z.string().describe("Organization ID"), id: z.string().describe("Department ID"), });
  • Registers the tool in the registry with name, description, and input schema derived from the Zod schema.
    { name: "get_organization_department_info", description: "Get information about a department in an organization", inputSchema: zodToJsonSchema(types.GetOrganizationDepartmentInfoSchema), },
  • Core helper function that constructs the API URL using organizationId and department id, performs a GET request via yunxiaoRequest, and parses the response using DepartmentInfoSchema.
    export async function getOrganizationDepartmentInfoFunc( organizationId: string, id: string ): Promise<z.infer<typeof DepartmentInfoSchema>> { const url = `/oapi/v1/platform/organizations/${organizationId}/departments/${id}`; const response = await yunxiaoRequest(url, { method: "GET", }); return DepartmentInfoSchema.parse(response); }

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