Skip to content

fields for search_repositories and search_commits #3975

Backlog

Description

@FalkWoldmann

Describe the feature or problem you'd like to solve

search_issues, search_pull_requests and list_commits take fields to cut the response down, but search_repositories and search_commits don't. A repo search I ran through a coding agent returned around 20 KB of repo metadata when I only needed names and URLs. minimal_output helps a bit, but it's all or nothing.

Proposed solution

Add the same fields parameter to search_repositories and search_commits, so an agent can ask for just full_name and html_url, or sha and html_url. It would also make the search tools consistent with each other.

Example prompts or workflows (for tools/toolsets only)

  • "Find the repo for service X in org Y" only needs full_name and html_url
  • "Which repos in org Y are written in Rust?" only needs full_name and language
  • "Find the commit that introduced X in owner/repo" only needs sha, html_url and the message

Additional context

With an agent every KB of tool output lands in the model's context, so a search that returns a full page of results gets expensive quickly. Would you take a PR for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions