Skip to main content
Glama

GitHub Code Search

github_code_search
Read-only

Search GitHub code by exact substring. Provide a code snippet and filter by language, extension, filename, owner, or repo to locate specific code patterns. Returns matching files with code context.

Instructions

Search files on GitHub with code snippets. This is not a fuzzy search, so provide exact substrings you want to find.

Normally you should try different queries and combinations of filters until you get useful results. If you are searching for something generic, try thinking in reverse about what the code might be, and search for that code snippet instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_snippetYesSearch exact string you want to find. DO NOT use any wildcard syntax.
extensionNo
filenameNo
ownerNo
repoNoFormat: owner/repo
languageNo
match_typeNocontent
Behavior3/5

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

The description adds the behavioral trait of not being fuzzy search, which goes beyond the readOnly annotation. However, it doesn't mention rate limits, result limits, or other potential constraints. Annotations already indicate read-only, so no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is reasonably concise with two paragraphs, but it includes some repetitive strategy advice. Important warnings are front-loaded, but the second paragraph could be trimmed without losing value.

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 tool has 7 parameters (low schema coverage) and no output schema, the description should provide more parameter guidance. It covers the required parameter well but leaves others largely unexplained, making it incomplete for effective usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is low (29%). The description adds value for the required parameter (code_snippet) by emphasizing exact substrings and no wildcards, but provides no additional semantics for the other 6 parameters (extension, filename, owner, repo, language, match_type), leaving them poorly documented.

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 title and description clearly state the tool searches GitHub files for code snippets. It distinguishes from the sibling tool (github_graphql) by focusing on code search, and clarifies it's not fuzzy search, requiring exact substrings.

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

Usage Guidelines4/5

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

The description provides explicit guidance: 'not a fuzzy search', 'provide exact substrings', and encourages trying different queries and thinking in reverse. It doesn't explicitly contrast with the sibling tool, but the context implies code search usage.

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/promplate/refined-mcp-servers'

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