Skip to main content
Glama
Lipdog
by Lipdog

search_code

Read-onlyIdempotent

Search across all GitHub repositories to find code examples, usage patterns, or library imports using advanced queries with regex, boolean operators, and qualifiers.

Instructions

Search for code across all of GitHub (200M+ repos), or narrowed to one repo/org/path. Supports regex (/pattern/), tree-sitter symbol search (symbol:name), boolean operators (AND/OR/NOT), exact phrases, and code-search qualifiers: repo:, org:, user:, path:, language:, content:, symbol:, is:archived, is:fork, is:vendored, is:generated, size:, in:file, in:path, filename:, extension:. Convenience params repo, language, path are appended as qualifiers automatically. Use this to find real-world usage patterns (how do projects actually import and call library X?), discover who uses a library (search for its import/crate name across GitHub), or locate example code for a framework you're evaluating. NOT for finding where a symbol is defined (use find_symbol). IMPORTANT: GitHub's code-search endpoint does NOT support repository-level qualifiers like stars:, pushed:, forks:, created:, topic:, license:, archived: — GitHub silently matches them as literal file content, giving wrong results with no error. For popularity-filtered discovery, use search_repos instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGitHub code search query. Supports regex (/pattern/), symbol:name, boolean (AND/OR/NOT), exact phrases. Code-search qualifiers: repo:, org:, user:, path:, language:, content:, symbol:, is:archived, is:fork, is:vendored, is:generated, size:, in:, filename:, extension:. Repository-level filters (stars:, pushed:, forks:, created:, topic:, license:, archived:) are NOT supported by code search — use `search_repos` for those.
repoNoScope to one repository (owner/repo).
languageNoFilter by programming language.
pathNoFilter by file path pattern (e.g. src/).
pageNoPage number for paginated results.
per_pageNoResults per page (max 100).
context_linesNoMax lines of code context per match (default 10).
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds critical behavioral details: that repository-level qualifiers silently match literal content (giving wrong results), and that convenience params are appended as qualifiers automatically. This significantly aids safe usage.

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

Conciseness4/5

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

The description is well-structured, starting with purpose, then features, use cases, and warnings. It is fairly concise given the amount of information, though slightly longer than minimalist. Every sentence adds value, but it could be slightly more streamlined.

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

Completeness5/5

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

Despite no output schema, the description covers query syntax, scoping, convenience params, unsupported qualifiers, and pagination parameters. It distinguishes from siblings and provides complete guidance for effective use, making it contextually rich.

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 all 7 parameters adequately. The description adds minor context about automatic appending of repo/language/path as qualifiers, but does not substantially augment parameter meaning beyond the schema.

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 that this tool searches for code across all of GitHub or narrowed scopes, and distinguishes from sibling tool find_symbol by specifying what it is NOT for (finding symbol definitions). The verb 'search' and resource 'code' are explicit.

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?

Provides explicit use cases (finding usage patterns, discovering library users, locating examples) and clear when-not-to-use with alternative named (find_symbol). Also warns about unsupported repository-level qualifiers and directs to search_repos for popularity-filtered discovery.

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/Lipdog/fossick-mcp'

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