Skip to content

fix invalid read file tool #85

@samuelstroschein

Description

@samuelstroschein

Context

hm i get this a lot

Output

Invalid input for tool read_file: Type validation failed: Value: {"version_id":"MYeCL6O3ccVZ1FcUHdXyp","path":"/AGENTS.md","fileId":"/AGENTS.md","byteOffset":0,"byteLength":500000,"lineOffset":0,"lineLimit":200,"maxBytes":200000,"maxChars":15000}.

Error message: [

{

"code": "custom",
"path": [],
"message": "Provide only one of 'path' or 'fileId'"

}

]

Proposal

The read file tool shouldn't have an overload.

We can split it into two functions

read_file_by_path
read_file_by_id 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions