Skip to main content
Glama

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
NameRequiredDescriptionDefault
orgYesOrganization name
package_nameYesThe name of the package
package_typeYesThe type of package

Implementation Reference

  • 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); }
  • 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), },
  • 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) }], }; }
  • 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"), });

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