Make a tool that shows files in replies
Your tools can do more than open from a list. A tool can say which kinds of file it shows, and then agents can show those files under their replies with it.
Steps
Ask an agent for it
In a conversation, say what you want, such as “Make me a tool that shows 3D models in replies.” The agent starts from the same starter as any other tool, and lists the file types the tool takes.
Have the agent show a file with it
Ask it to show you a file of that type. A card appears under its reply. Press play to start the tool.
Change it by asking
Tell the agent what to change, as with any tool.
Where a tool lives
- In the project. A tool in the project’s
enjoy-appsfolder works in that project, and people who copy the project from Git get it too. This is where agents make them. - On your computer. A tool in
~/Enjoy/Pluginsworks in all your projects.
When several tools take the same kind of file, the project’s comes first, then yours, then Enjoy’s. The menu on a reply’s card chooses another, and Enjoy remembers your choice for files of that type.
Good to know
- It’s an ordinary tool. It’s a folder with an
enjoy-app.json, andpreviewsin that file says what it shows:acceptslists the file types, such asmodel/gltf-binaryorvideo/*, andentrynames its page. Its page usesenjoy.previewto get the file and to attach moments to your reply. - What a tool can do. It’s a whole web page, with a server of its own if it needs one. It gets the file’s address, your theme, whatever the agent passes it, and on request the file’s waveform and transcript. It can widen its card, as Widen does, where the card doesn’t already take all the conversation’s width, as a video’s, a sound’s, a page’s and a picture’s do.
- What a tool can’t do. It draws only inside its card. It can’t read your conversation or send messages. It can only add a chip to your message, and you decide whether to send it.
- Only you start it. A tool’s server runs as you, with access to your files, so a reply arrives as a picture and the tool starts only when you press play. Tools you get from someone else’s project are worth the same care as any code you run.