get_org_package
Retrieve a specific package from an organization by specifying the organization name, package type, and package name. Works with npm, maven, rubygems, docker, nuget, and container packages.
Instructions
Get a package for an organization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Organization name | |
| package_name | Yes | The name of the package | |
| package_type | Yes | The type of package |
Implementation Reference
- src/operations/packages.ts:163-174 (handler)Core handler function implementing the get_org_package tool logic by calling GitHub API and parsing 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); }
- src/operations/packages.ts:69-73 (schema)Public input schema defining parameters for get_org_package tool (org, package_type, package_name).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"), });
- src/index.ts:290-294 (registration)Tool registration in listTools response, specifying 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 (handler)MCP server handler case that validates input with internal schema and delegates to packages.getOrgPackage.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) }], }; }
- src/operations/packages.ts:75-77 (schema)Internal extended schema including github_pat for validation in the dispatch handler.export const _GetOrgPackageSchema = GetOrgPackageSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });