Skip to main content
Glama

get_gist

Retrieve a specific GitHub gist by its ID to access code snippets, notes, or shared content stored on GitHub's gist platform.

Instructions

Get a specific gist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gist_idYesThe ID of the gist

Implementation Reference

  • The main handler function that fetches a specific GitHub gist by ID using the GitHub API and parses the response with GistSchema.
    export async function getGist(
      github_pat: string,
      gist_id: string
    ): Promise<z.infer<typeof GistSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/gists/${gist_id}`
      );
      return GistSchema.parse(response);
    }
  • Input schema for the get_gist tool, defining the required gist_id parameter.
    export const GetGistSchema = z.object({
      gist_id: z.string().describe("The ID of the gist"),
    });
  • src/index.ts:244-247 (registration)
    Tool registration in the list of tools provided to the MCP server, including name, description, and input schema.
      name: "get_gist",
      description: "Get a specific gist",
      inputSchema: zodToJsonSchema(gists.GetGistSchema),
    },
  • src/index.ts:675-682 (registration)
    Dispatch handler in the switch statement that parses arguments, calls the getGist function, and formats the response for MCP.
    case "get_gist": {
      const args = gists._GetGistSchema.parse(params.arguments);
      const { github_pat, gist_id } = args;
      const result = await gists.getGist(github_pat, gist_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 full burden. It states 'Get a specific gist,' which implies a read-only operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error conditions (e.g., invalid ID), or response format. For a tool with no annotations, this leaves significant gaps in understanding how it behaves.

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 ('Get a specific gist') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured for its simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, 100% schema coverage, no output schema), the description is minimally adequate. It states what the tool does but lacks context on behavior, usage, or output. Without annotations or an output schema, more detail on response format or error handling would improve completeness, but it's not entirely inadequate for such a simple tool.

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%, with the parameter 'gist_id' fully documented in the schema as 'The ID of the gist.' The description adds no additional meaning beyond this, as it doesn't explain parameter usage, format, or examples. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 'Get a specific gist' clearly states the action (get) and resource (gist), with 'specific' implying retrieval by identifier. It distinguishes from sibling 'list_gists' by focusing on a single item rather than listing multiple. However, it lacks explicit differentiation from other get_* tools like 'get_issue' or 'get_file_contents' beyond the resource name.

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. The description implies usage for retrieving a single gist by ID, but it doesn't mention prerequisites (e.g., needing a valid gist_id), exclusions, or comparisons to similar tools like 'list_gists' for browsing or 'get_file_contents' for file data. Usage is implied but not explicitly stated.

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