Skip to main content
Glama

Find Real-World Code Examples

gt_examples
Read-onlyIdempotent

Search GitHub for real-world code examples of any library or pattern. Get 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.

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 confirm read-only, idempotent, non-destructive, and open-world. The description adds behavioral context about requiring GT_GITHUB_TOKEN for rate limits and that results come from popular open-source projects, which is useful beyond annotations.

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?

Extremely concise: two sentences. First sentence covers purpose and output, second covers requirement. No unnecessary words.

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 no output schema, the description adequately explains the return type (code snippets with attribution). It also covers the env var requirement. A minor gap is lack of detail on output structure, but sufficient for a search 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?

Input schema covers all parameters with descriptions (100% coverage). The description does not add additional semantic meaning beyond what the schema provides, so baseline of 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 the tool searches GitHub for real-world code examples and returns snippets with attribution. It distinguishes itself from siblings like gt_audit or gt_auto_scan by specifically targeting example search.

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

Usage Guidelines3/5

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

The description explains what the tool does and mentions the required env var for higher rate limits, but does not explicitly state when to use it over alternatives or when not to use it. Usage is implied, no exclusion criteria.

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/ws-mcp'

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