get_organization_member_info
Retrieve member details from Alibaba Cloud DevOps organizations to manage team access and permissions using organization and member IDs.
Instructions
Get information about a member in an organization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organizationId | Yes | 组织 ID | |
| memberId | Yes | 成员 ID |
Implementation Reference
- tool-handlers/organization.ts:53-62 (handler)Handles the 'get_organization_member_info' tool request by parsing input arguments with GetOrganizationMemberInfoSchema, calling the getOrganizationMemberInfoFunc helper, and returning the member information as a JSON-formatted text response.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)}] } }
- Defines the input schema GetOrganizationMemberInfoSchema (organizationId and memberId) and the output type GetOrganizationMemberInfo inferred from MemberInfoSchema.export const GetOrganizationMemberInfoSchema = z.object({ organizationId: z.string().describe("组织 ID"), memberId: z.string().describe("成员 ID"), }); export type GetOrganizationMemberInfo = z.infer<typeof MemberInfoSchema>;
- tool-registry/organization.ts:41-45 (registration)Registers the 'get_organization_member_info' tool in the tool registry, specifying name, description, and input schema derived from Zod schema.{ name: "get_organization_member_info", description: "Get information about a member in an organization", inputSchema: zodToJsonSchema(types.GetOrganizationMemberInfoSchema), },
- Core helper function getOrganizationMemberInfoFunc that performs the API GET request to retrieve organization member details and validates the response using MemberInfoSchema.export const getOrganizationMemberInfoFunc = async ( organizationId: string, memberId: string ): Promise<GetOrganizationMemberInfo> => { const url = `/oapi/v1/platform/organizations/${organizationId}/members/${memberId}`; console.log("aaa", url) const response = await yunxiaoRequest(url, { method: "GET", }); return MemberInfoSchema.parse(response); };