Abilities API Granularity vs. REST Endpoints #20
mateuswetah
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks 👋
I’ve been experimenting with the new Abilities API, and I’d love to get some feedback from you about how granular abilities should be compared to REST endpoints.
Why? Well, as I try to understand it, the Abilities API looks very similar to the REST API in several ways:
Yet I understand why the Abilities API must exist! Separating that layer from the MCP Adapter and keeping things generic enough to be usable by agents (either AI or the Command Palette, that will be super cool). But still I want to avoid two pitfalls:
For example, in a plugin I work on we have a custom REST controller for “collections” (basically a custom post type). That REST API already exposes stuff like:
GET /collections(list collections)GET /collections/:id(collection details, including permalink)GET /items?collection_id=ID(list items inside a collection)POST /exporters/:exporter_type?collection_id=IDTriggers async workflows to export a collection, returns a job id.When I think about registering abilities for these, I get stuck on questions of granularity.
Should abilities be very small/atomic, like REST endpoints?
Example:
This makes abilities predictable and composable, but often requires multiple calls for a single workflow (list → pick ID → open).
Or should abilities be more “curated workflows”?
Example:
This feels more “user-action-oriented” and useful for Command Palette / AI agents, but it overlaps less cleanly with REST.
What about overlap with existing fields?
In my example, collections already have a
guidfield with the public URL. Does it still make sense to have a dedicated open-collection ability, or should get-collection-info just include the link and be enough?Is the expectation that agents (or clients like the Command Palette) will chain multiple small abilities to reach a goal?
For example:
Or should I instead expose a single ability that accepts the collection name and returns the link in one step?
To summarize:
No easy stuff I know, just think this is a nice place to hear from others.
Thanks for any insights 🙏
Beta Was this translation helpful? Give feedback.
All reactions