Skip to content

get_file_contents: Add ability to select line(s) ranges #350

Closed

Description

@kaovilai

Describe the feature or problem you’d like to solve

get_file_contents - Get contents of a file or directory

owner: Repository owner (string, required)
repo: Repository name (string, required)
path: File path (string, required)
ref: Git reference (string, optional)
begin: begin line# (number, optional)
end: end line# (number, optional)

requested addition in bold

Proposed solution

See above

Additional context

This may help reduce model context consumed by parsing large files if we only want to request a subset..

Activity

  1. added
    enhancement
    on Apr 25, 2025
  2. aryasoni98 commented on Apr 26, 2025

    @aryasoni98
    Contributor

    @kaovilai I came across this issue and would love to contribute could you please assign it to me?

  3. kaovilai commented on Apr 27, 2025

    @kaovilai
    ContributorAuthor

    I'm not a maintainer here so I cannot assign anyone.

  4. Akshata990418 commented on Jul 30, 2025

    @Akshata990418

    I have integrated Github MCP to my application chainlit+langchain i m also not able to fetch the file content using get_file_contents tool. could anyone help with this @aryasoni98 @kaovilai

    Im facing this error while trying to use get_file_contents tool

    TypeError: Type is not msgpack serializable: ToolMessage

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

    enhancementtool-improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions