Skip to main content
Glama
yjiace

AlibabaCloud DevOps MCP Server

by yjiace
organization.ts3.92 kB
import * as organization from '../operations/organization/organization.js'; import * as members from '../operations/organization/members.js'; import * as types from '../common/types.js'; export const handleOrganizationTools = async (request: any) => { switch (request.params.name) { case "list_organization_departments": { const args = types.GetOrganizationDepartmentsSchema.parse(request.params.arguments); const departments = await organization.getOrganizationDepartmentsFunc( args.organizationId, args.parentId ?? undefined ); return { content: [{ type: "text", text: JSON.stringify(departments, null, 2) }], }; } 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) }], }; } case "get_organization_department_ancestors": { const args = types.GetOrganizationDepartmentAncestorsSchema.parse(request.params.arguments); const ancestors = await organization.getOrganizationDepartmentAncestorsFunc( args.organizationId, args.id ); return { content: [{ type: "text", text: JSON.stringify(ancestors, null, 2) }], }; } case "list_organization_members": { const args = types.GetOrganizationMembersSchema.parse(request.params.arguments); const orgMembers = await members.getOrganizationMembersFunc( args.organizationId, args.page ?? 1, args.perPage ?? 100 ); return { content: [{ type: "text", text: JSON.stringify(orgMembers, null, 2)}] } } case "get_organization_member_info": { const args = types.GetOrganizationMemberInfoSchema.parse(request.params.arguments); const memberInfo = await members.getOrganizationMemberInfoFunc( args.organizationId, args.memberId ); return { content: [{ type: "text", text: JSON.stringify(memberInfo, null, 2)}] } } case "get_organization_member_info_by_user_id": { const args = types.GetOrganizationMemberByUserIdInfoSchema.parse(request.params.arguments); const memberInfo = await members.getOrganizationMemberByUserIdInfoFunc(args.organizationId, args.userId); return { content: [{ type: "text", text: JSON.stringify(memberInfo, null, 2)}] } } case "search_organization_members": { const args = types.SearchOrganizationMembersSchema.parse(request.params.arguments); const membersResult = await members.searchOrganizationMembersFunc( args.organizationId, args.includeChildren ?? false, args.page ?? 1, args.perPage ?? 100, args.deptIds ?? undefined, args.nextToken ?? undefined, args.query ?? undefined, args.roleIds ?? undefined, args.statuses ?? undefined, ) return { content: [{ type: "text", text: JSON.stringify(membersResult, null, 2)}] } } case "list_organization_roles": { const args = types.ListOrganizationRolesSchema.parse(request.params.arguments); const roles = await organization.listOrganizationRolesFunc(args.organizationId); return { content: [{ type: "text", text: JSON.stringify(roles, null, 2)}] } } 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)}] } } default: return null; } };

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

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