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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't specify authentication requirements, rate limits, error conditions, or the format/scope of the returned information. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with zero wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like authentication, errors, or return format, which are critical for a read operation. While the schema covers parameters well, the overall context for safe and effective use is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('organizationId' and 'id') clearly documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain how to obtain these IDs or their relationships), so it meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'information about a department in an organization', which is specific and unambiguous. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_organization_department_ancestors' or 'list_organization_departments', which might retrieve related department data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing specific IDs), exclusions, or comparisons to sibling tools like 'list_organization_departments' for bulk retrieval or 'get_organization_department_ancestors' for hierarchical data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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