Skip to content

Parse tool descriptions from docstring #981

@vikigenius

Description

@vikigenius

Is your feature request related to a problem? Please describe.
Having to write down the names of all arguments again and their description in the tool macro is annoying

Describe the solution you'd like
In python pydantic-ai for example just parses the docstring

@my_agent.tool
async def search_documents(query: str, max_docs: int):
    """Search documents for query.

    Args:
        query: The query to search
        max_docs: Maximum documents to return
    """

Can we do something similar here? Parse the doc comments instead for the tool spec

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