Skip to main content
Glama

list_org_packages

Retrieve and filter packages for a GitHub organization by type and visibility to manage dependencies and track software assets.

Instructions

List packages for an organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgYesOrganization name
package_typeYesThe type of package to filter for
visibilityNoThe visibility to filter for
per_pageNoResults per page (max 100, default 30)
pageNoPage number of the results

Implementation Reference

  • Core handler function that constructs the GitHub API URL for organization packages, appends query parameters, fetches data using githubRequest, and parses the response with Zod.
    export async function listOrgPackages(
      github_pat: string,
      org: string,
      options: {
        package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container";
        visibility?: "public" | "private" | "internal";
        per_page?: number;
        page?: number;
      } = { package_type: "npm" }
    ): Promise<z.infer<typeof PackageSchema>[]> {
      const url = new URL(`https://api.github.com/orgs/${org}/packages`);
      
      if (options.package_type) url.searchParams.append("package_type", options.package_type);
      if (options.visibility) url.searchParams.append("visibility", options.visibility);
      if (options.per_page) url.searchParams.append("per_page", options.per_page.toString());
      if (options.page) url.searchParams.append("page", options.page.toString());
      
      const response = await githubRequest(github_pat, url.toString());
      return z.array(PackageSchema).parse(response);
    }
  • Public input schema for the list_org_packages tool, used in tool registration's inputSchema.
    export const ListOrgPackagesSchema = z.object({
      org: z.string().describe("Organization name"),
      package_type: z.enum(["npm", "maven", "rubygems", "docker", "nuget", "container"]).describe("The type of package to filter for"),
      visibility: z.enum(["public", "private", "internal"]).optional().describe("The visibility to filter for"),
      per_page: z.number().optional().describe("Results per page (max 100, default 30)"),
      page: z.number().optional().describe("Page number of the results"),
    });
  • Extended internal schema including github_pat, used for parsing arguments in the dispatch handler.
    export const _ListOrgPackagesSchema = ListOrgPackagesSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:276-278 (registration)
    Tool registration entry in the ListTools response, defining name, description, and input schema.
    name: "list_org_packages",
    description: "List packages for an organization",
    inputSchema: zodToJsonSchema(packages.ListOrgPackagesSchema),
  • Dispatch handler in CallToolRequest that parses arguments with internal schema, extracts parameters, calls the core listOrgPackages function, and formats response.
    case "list_org_packages": {
      const args = packages._ListOrgPackagesSchema.parse(params.arguments);
      const { github_pat, org, ...options } = args;
      const result = await packages.listOrgPackages(github_pat, org, options);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't mention pagination behavior (implied by 'per_page' and 'page' parameters), rate limits, authentication requirements, or what the return format looks like. For a tool with 5 parameters and no output schema, this leaves significant behavioral gaps.

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 gets straight to the point with zero wasted words. It's appropriately sized for a list operation and front-loads the essential information. Every word earns its place.

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 tool has 5 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the filtering behavior (package_type and visibility parameters), pagination details, authentication requirements, or what the return data looks like. For a list operation with multiple filtering options and no structured output documentation, more context is needed.

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%, so the schema already fully documents all 5 parameters with descriptions and enums. The description adds no additional parameter semantics beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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 'List packages for an organization' clearly states the verb ('List') and resource ('packages for an organization'), making the purpose immediately understandable. It distinguishes from siblings like 'list_repo_packages' and 'list_user_packages' by specifying organization scope, though it doesn't explicitly contrast with them. The description is specific but lacks explicit sibling differentiation.

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 like 'list_repo_packages' or 'list_user_packages'. It mentions the organization scope but doesn't explain when organization-level listing is preferred over repository or user-level listing. No exclusions, prerequisites, or contextual usage hints are provided.

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/MissionSquad/mcp-github'

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