Skip to content

Add API to list / execute tools? #16

@bokand

Description

@bokand

We didn't include it in our initial explainer since these are things the author ca already do, however, having an API to list out the registered tools and be able to execute them by name and argument dictionary would be useful for external agents (e.g. provided via extensions or third-party libraries).

Perhaps something like:

window.agent.tools[0];

Would return an object like:

{
    name: "add-todo",
    description: "Add a new todo item to the list",
    inputSchema: {
        type: "object",
        properties: {
            text: { type: "string", description: "The text of the todo item" }
        },
        required: ["text"]
    },
    execute: <...function object...>
}

Which a third-party agent could use via await window.agent.tools[0].execute({text: "foo"})

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