Skip to main content
Glama

Find Real-World Code Examples

gt_examples
Read-onlyIdempotent

Search GitHub for real-world usage examples of any library or pattern. Returns code snippets from popular open-source projects with repository attribution.

Instructions

Search GitHub for real-world usage examples of any library or pattern. Returns code snippets from popular open-source projects with repository attribution.

Requires GT_GITHUB_TOKEN env var for higher rate limits (5000 req/hr vs 60 unauthenticated).

Source: open-source GitHub repositories (not the library's own docs). Use this when you want to see how real projects use a library. For code snippets extracted from the library's own documentation, use gt_snippets instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryYesLibrary or package name to find examples for, e.g. 'drizzle-orm', 'tanstack/query', 'fastapi'
patternNoSpecific usage pattern to search for, e.g. 'middleware', 'useMutation', 'auth guard'
languageNoProgramming language filter: 'typescript', 'python', 'rust', 'go'
maxResultsNoNumber of code examples to return (default: 5, max: 10)
Behavior4/5

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

Annotations already provide readOnlyHint, destructiveHint, idempotentHint, openWorldHint. The description adds important context: requires GT_GITHUB_TOKEN for higher rate limits and clarifies the source as open-source repositories, complementing annotations without contradiction.

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 four sentences with no fluff. It front-loads the purpose, then covers authentication, usage context, and alternatives efficiently.

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

Completeness4/5

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

Given 4 well-documented parameters, comprehensive annotations, and no output schema, the description covers purpose, when to use, auth, and source. It could mention return format (code snippets with attribution) but that is implicit. Overall complete.

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 already documents each parameter. The description does not add additional parameter-level details beyond what the schema provides, but it does mention the token requirement as a behavioral note. Baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states 'Search GitHub for real-world usage examples' with specific verb and resource, and distinguishes itself from sibling tool gt_snippets by noting the source of examples.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this when you want to see how real projects use a library' and provides an alternative: 'For code snippets extracted from the library's own documentation, use gt_snippets instead.'

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/rm-rf-prod/GroundTruth-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server