Skip to main content
Glama

search

Read-only

Find beginner-friendly open-source issues on GitHub matching your programming languages and interests to start contributing.

Instructions

Search GitHub for beginner-friendly open-source issues to contribute to. Returns issues matching configured languages and interests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum number of issues to return (default: 5)

Implementation Reference

  • The core handler logic for the 'search' tool. It initializes IssueDiscovery with a GitHub token and fetches search results based on the provided options.
    export async function runSearch(options: SearchOptions): Promise<SearchOutput> {
      const token = requireGitHubToken();
    
      const discovery = new IssueDiscovery(token);
    
      const candidates = await discovery.searchIssues({ maxResults: options.maxResults });
    
      const stateManager = getStateManager();
      const { config } = stateManager.getState();
      const excludedRepos = config.excludeRepos || [];
      const aiPolicyBlocklist = config.aiPolicyBlocklist ?? DEFAULT_CONFIG.aiPolicyBlocklist ?? [];
      const searchOutput: SearchOutput = {
        candidates: candidates.map((c) => {
          const repoScoreRecord = stateManager.getRepoScore(c.issue.repo);
          return {
            issue: {
              repo: c.issue.repo,
              repoUrl: `https://github.com/${c.issue.repo}`,
              number: c.issue.number,
              title: c.issue.title,
              url: c.issue.url,
              labels: c.issue.labels,
            },
            recommendation: c.recommendation,
            reasonsToApprove: c.reasonsToApprove,
            reasonsToSkip: c.reasonsToSkip,
            searchPriority: c.searchPriority,
            viabilityScore: c.viabilityScore,
            repoScore: repoScoreRecord
              ? {
                  score: repoScoreRecord.score,
                  mergedPRCount: repoScoreRecord.mergedPRCount,
                  closedWithoutMergeCount: repoScoreRecord.closedWithoutMergeCount,
                  isResponsive: repoScoreRecord.signals?.isResponsive ?? false,
                  lastMergedAt: repoScoreRecord.lastMergedAt,
                }
              : undefined,
          };
        }),
        excludedRepos,
        aiPolicyBlocklist,
      };
      if (discovery.rateLimitWarning) {
        searchOutput.rateLimitWarning = discovery.rateLimitWarning;
      }
      return searchOutput;
    }
  • The MCP tool registration for the 'search' command, which includes input validation for maxResults and wraps the call to the search handler.
    // 3. search — Search for contributable issues
    server.registerTool(
      'search',
      {
        description:
          'Search GitHub for beginner-friendly open-source issues to contribute to. Returns issues matching configured languages and interests.',
        inputSchema: {
          maxResults: z.number().optional().describe('Maximum number of issues to return (default: 5)'),
        },
        annotations: { readOnlyHint: true },
      },
      wrapTool((args: { maxResults?: number }) => {
        const MAX_SEARCH_RESULTS = 100;
        let maxResults = args.maxResults ?? 5;
        if (!Number.isInteger(maxResults) || maxResults < 1) {
          throw new Error(`Invalid maxResults: ${maxResults}. Must be a positive integer.`);
        }
        if (maxResults > MAX_SEARCH_RESULTS) {
          maxResults = MAX_SEARCH_RESULTS;
        }
        return runSearch({ maxResults });
      }),
    );
Behavior3/5

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

Annotations declare readOnlyHint=true, confirming this is a safe read operation. The description adds valuable context that results are filtered by 'configured languages and interests' and targeted at 'beginner-friendly' issues, but omits rate limits, pagination behavior, or the structure of returned issues.

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?

Two sentences efficiently structured: first establishes purpose and target, second describes return behavior. No redundancy or wasted words; 'configured languages and interests' is necessary context for understanding the search scope.

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 single-parameter search tool with simple schema and readOnly annotations, the description adequately covers what is searched, filtering criteria, and return type. Lacks explicit mention of the default value behavior for maxResults, though this is documented in the schema.

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?

With 100% schema description coverage for the single 'maxResults' parameter, the schema carries the semantic burden. The description mentions 'configured languages and interests' which explains implicit filtering criteria not represented in the input schema, meeting the baseline for high-coverage schemas.

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 provides a specific verb ('Search'), resource ('GitHub'), and scope ('beginner-friendly open-source issues'), clearly distinguishing this from sibling tools like 'claim', 'track', and 'config' which appear to manage local project state rather than search external repositories.

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 implies usage through 'to contribute to' and mentions it 'Returns issues', suggesting it's for discovery, but lacks explicit guidance on when to use this versus local issue management tools or the prerequisite of configuring languages/interests via the 'config' sibling.

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/costajohnt/oss-autopilot'

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