Skip to main content
Glama

get_release_asset

Retrieve release assets from GitHub repositories by specifying owner, repository name, and asset ID to access downloadable files.

Instructions

Get a release asset from a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
asset_idYesThe ID of the asset

Implementation Reference

  • The primary handler function that performs the GitHub API request to fetch the release asset metadata and parses the response using ReleaseAssetSchema.
    export async function getReleaseAsset(
      github_pat: string,
      owner: string,
      repo: string,
      asset_id: number
    ): Promise<z.infer<typeof ReleaseAssetSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/repos/${owner}/${repo}/releases/assets/${asset_id}`
      );
      return ReleaseAssetSchema.parse(response);
    }
  • Input Zod schemas for validating tool parameters: public schema (GetReleaseAssetSchema) and internal schema including GitHub PAT (_GetReleaseAssetSchema).
    export const GetReleaseAssetSchema = z.object({
      owner: z.string().describe("Repository owner (username or organization)"),
      repo: z.string().describe("Repository name"),
      asset_id: z.number().describe("The ID of the asset")
    });
    
    export const _GetReleaseAssetSchema = GetReleaseAssetSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • Output Zod schema for parsing the GitHub release asset response.
    export const ReleaseAssetSchema = z.object({
      url: z.string(),
      id: z.number(),
      node_id: z.string(),
      name: z.string(),
      label: z.string().nullable(),
      content_type: z.string(),
      state: z.string(),
      size: z.number(),
      download_count: z.number(),
      created_at: z.string(),
      updated_at: z.string(),
      browser_download_url: z.string(),
      uploader: GitHubIssueAssigneeSchema.nullable(),
    });
  • src/index.ts:180-183 (registration)
    Registers the 'get_release_asset' tool in the MCP server's list of tools, including name, description, and input schema.
      name: "get_release_asset",
      description: "Get a release asset from a GitHub repository",
      inputSchema: zodToJsonSchema(releases.GetReleaseAssetSchema),
    },
  • MCP server dispatcher for the tool: parses arguments using internal schema and calls the core handler function.
    case "get_release_asset": {
      const args = releases._GetReleaseAssetSchema.parse(params.arguments);
      const result = await releases.getReleaseAsset(args.github_pat, args.owner, args.repo, args.asset_id);
      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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but does not describe what 'Get' entails—e.g., whether it downloads the asset file, returns metadata, requires authentication, has rate limits, or handles errors. This leaves significant gaps in understanding the tool's behavior.

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 front-loads the core purpose without unnecessary words. Every part of the sentence ('Get a release asset from a GitHub repository') directly contributes to understanding the tool's function, making it appropriately concise and well-structured.

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 for a tool with 3 parameters and no behavioral context. It does not explain what is returned (e.g., file content vs. metadata), authentication needs, or error handling, leaving the agent with insufficient information to use the tool effectively.

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 the parameters (owner, repo, asset_id). The description does not add any meaning beyond what the schema provides, such as explaining where to find asset IDs or format requirements. Baseline 3 is appropriate when the schema does the heavy lifting.

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 action ('Get') and resource ('a release asset from a GitHub repository'), making the purpose immediately understandable. It does not distinguish from siblings like 'upload_release_asset' or 'list_releases', but the verb 'Get' is specific enough to imply retrieval rather than creation or listing.

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. For example, it does not mention that 'list_releases' might be needed first to find asset IDs, or clarify that this is for downloading assets rather than metadata. The description offers no context about prerequisites or exclusions.

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