Skip to main content
Glama

get_org_package

Retrieve package information for an organization from GitHub, specifying package type and name to access details for npm, Maven, RubyGems, Docker, NuGet, or container packages.

Instructions

Get a package for an organization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgYesOrganization name
package_typeYesThe type of package
package_nameYesThe name of the package

Implementation Reference

  • Core handler function that retrieves a specific package from a GitHub organization by making an authenticated API request to the GitHub Packages endpoint and parsing the response with PackageSchema.
    export async function getOrgPackage(
      github_pat: string,
      org: string,
      package_type: "npm" | "maven" | "rubygems" | "docker" | "nuget" | "container",
      package_name: string
    ): Promise<z.infer<typeof PackageSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/orgs/${org}/packages/${package_type}/${package_name}`
      );
      return PackageSchema.parse(response);
    }
  • Zod input schemas for the get_org_package tool: GetOrgPackageSchema (public inputs) and _GetOrgPackageSchema (internal with GitHub PAT).
    export const GetOrgPackageSchema = z.object({
      org: z.string().describe("Organization name"),
      package_type: z.enum(["npm", "maven", "rubygems", "docker", "nuget", "container"]).describe("The type of package"),
      package_name: z.string().describe("The name of the package"),
    });
    
    export const _GetOrgPackageSchema = GetOrgPackageSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:290-294 (registration)
    MCP tool registration in the server's listTools response, specifying the tool name, description, and input schema.
    {
      name: "get_org_package",
      description: "Get a package for an organization",
      inputSchema: zodToJsonSchema(packages.GetOrgPackageSchema),
    },
  • src/index.ts:758-765 (registration)
    Dispatch handler in the server's CallToolRequest handler that validates arguments with _GetOrgPackageSchema and invokes the getOrgPackage function.
    case "get_org_package": {
      const args = packages._GetOrgPackageSchema.parse(params.arguments);
      const { github_pat, org, package_type, package_name } = args;
      const result = await packages.getOrgPackage(github_pat, org, package_type, package_name);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Output schema used to parse and validate the GitHub API response for package details.
    export const PackageSchema = z.object({
      id: z.number(),
      name: z.string(),
      package_type: z.string(),
      owner: GitHubIssueAssigneeSchema.optional(),
      version_count: z.number().optional(),
      visibility: z.string(),
      url: z.string(),
      created_at: z.string(),
      updated_at: z.string(),
      html_url: z.string(),
      versions_url: z.string().optional(),
      repository_url: z.string().optional(),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states 'Get a package' without disclosing behavioral traits like read/write nature, authentication needs, rate limits, error handling, or return format. This is inadequate for a tool with potential complexity.

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

Conciseness4/5

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

The description is a single, efficient sentence with no wasted words. However, it's under-specified rather than concise, as it lacks necessary details for clarity and completeness, slightly reducing its effectiveness.

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 no annotations, no output schema, and a vague purpose, the description is incomplete. It fails to explain what 'Get' returns, how it behaves, or when to use it, making it insufficient for effective tool selection and invocation in this context.

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 fully documents parameters (org, package_type, package_name). The description adds no meaning beyond this, such as explaining package_type enum contexts or inter-parameter dependencies, meeting the baseline for high coverage.

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

Purpose3/5

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

The description states the action ('Get') and resource ('a package for an organization'), which is clear but vague. It doesn't specify what 'Get' entails (e.g., retrieve metadata, download, or list versions) or differentiate from siblings like 'get_repo_package' or 'get_user_package', leaving ambiguity about scope.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_repo_package' and 'get_user_package', the description lacks context on organizational vs. repository/user packages, and there are no prerequisites or exclusions mentioned.

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