Skip to main content
Glama

Search Github

search_github

Find public GitHub repositories by query and retrieve structured metadata including stars, language, and description.

Instructions

Search GitHub for public repositories and return a list of repository records.

Queries the GitHub search API over the network and returns a list of dicts, each with: name (str), owner (str), stars (int), description (str), and language (str). Results are ordered per the sort argument. Returns an empty list when no repository matches the query. Requires network access; may be subject to GitHub API rate limits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoString ordering for results; one of "best-match", "stars", "forks", or "updated". Example: "stars". Default "best-match".best-match
queryYesString search expression using GitHub search syntax, including qualifiers like "language:" or "stars:". Example: "web scraping language:python". No default (required).
max_resultsNoInteger maximum number of repositories to return. Example: 10. Default 20.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / max_results / description
      Previous value: -"Max repositories to return (default 20)."New value: +"Integer maximum number of repositories to return. Example: 10. Default 20."
    • changedInput schema / properties / query / description
      Previous value: -"Search query, e.g. \"web scraping language:python\"."New value: +"String search expression using GitHub search syntax, including qualifiers like \"language:\" or \"stars:\". Example: \"web scraping language:python\". No default (required)."
    • changedInput schema / properties / sort / description
      Previous value: -"\"best-match\" (default), \"stars\", \"forks\", or \"updated\"."New value: +"String ordering for results; one of \"best-match\", \"stars\", \"forks\", or \"updated\". Example: \"stars\". Default \"best-match\"."
  2. Changed20 schema fields changedv1.3.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / max_results / description
      Added value: +"Max repositories to return (default 20)."
    • removedInput schema / properties / max_results / title
      Removed value: -"Max Results"
    • addedInput schema / properties / query / description
      Added value: +"Search query, e.g. \"web scraping language:python\"."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • addedInput schema / properties / sort / description
      Added value: +"\"best-match\" (default), \"stars\", \"forks\", or \"updated\"."
    • removedInput schema / properties / sort / title
      Removed value: -"Sort"
    • removedInput schema / title
      Removed value: -"search_githubArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "ToolError": {
      -    "description": "A non-fatal problem encountered while scraping.",
      -    "properties": {
      -      "message": {
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "url": {
      -        "title": "Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url",
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / count / title
      Removed value: -"Count"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / errors / items / $ref
      Removed value: -"#/$defs/ToolError"
    • addedOutput schema / properties / errors / items / description
      Added value: +"A non-fatal problem encountered while scraping."
    • addedOutput schema / properties / errors / items / properties
      Added value: +{
      +  "message": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / errors / items / required
      Added value: +[
      +  "url",
      +  "message"
      +]
    • addedOutput schema / properties / errors / items / type
      Added value: +"object"
    • removedOutput schema / properties / errors / title
      Removed value: -"Errors"
    • removedOutput schema / properties / scraper / title
      Removed value: -"Scraper"
    • removedOutput schema / properties / source_urls / title
      Removed value: -"Source Urls"
    • removedOutput schema / title
      Removed value: -"ScrapeToolResult"
  3. Addedv1.1.7

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does it well: it discloses network access, GitHub API rate-limit susceptibility, return format with field names and types, ordering by the sort argument, and empty-list behavior. It stops short of covering error handling or authentication requirements, but it is substantially transparent.

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 compact and front-loaded: the first sentence states the core purpose, and the second adds behavioral and result details without filler. Every sentence earns its place, and there is no redundant or vague wording.

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?

For a public search tool with fully documented parameters, the description covers the main call semantics, result shape, no-match case, and network/rate-limit caveats. It does not enumerate alternatives or error behavior, but those are secondary for a no-annotation search endpoint.

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 input schema already fully documents query, sort, and max_results with defaults and examples. The description adds only that results are ordered per the sort argument, which mostly restates the schema, so the baseline score 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 opens with a specific action and resource: 'Search GitHub for public repositories and return a list of repository records.' This clearly distinguishes the tool from sibling search tools like search_images or search_youtube by naming the GitHub domain and describing the repository record output.

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 GitHub-specific scope makes the intended use clear, and the description explicitly notes it queries the GitHub search API, so an agent can infer when to choose this tool. It does not explicitly name alternatives or exclusion conditions, but no misleading usage signals are present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.