Abilities API

## Metadata
- Author: [[JuanMa Garrido]]
- Full Title: Abilities API
- Category: #articles
- Document Note: ---
tags: [WordPress, Abilities-API, MCP]
author: Merlin AI
source: YouTube
reference: [https://www.youtube.com/watch?v=m19VM2yIbHU]
date created: {{date:YYYY-MM-DD}} {{time:HH:mm}}
---
# 🏷️ Title: Abilities API
## 🧰 Action Inbox
- [H1] Map Abilities API to MCP tools — context/https://github.com/WordPress/abilities-api #articleseed
- [H2] Draft governance note on permissions callbacks — context/https://github.com/WordPress/abilities-api #addendum
- [H3] Build demo plugin exposing two safe abilities — context/https://github.com/WordPress/abilities-api #articleseed
- [H4] Test REST exposure flags in staging — context/https://github.com/WordPress/abilities-api #xref
- [H5] Sketch Workflows API chain example for posts — context/https://github.com/WordPress/wordpress-develop #articleseed
- [H6] Share MCP adapter setup gist with The WPCC — context/https://github.com/WordPress/ai-experiments #share
- [H7] Compare server vs client abilities in DX doc — context/https://modelcontextprotocol.io #xref
- [H8] Write incident note on input schema validation — context/https://github.com/WordPress/abilities-api #articleseed
- [H9] Cross-reference OSPO policy on application passwords — context/https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/ #xref
- [H10] Invite maintainers to workflow clinic session — context/https://make.wordpress.org/ #share
- [H11] Note aphorism: “Describe first, execute second.” — context/Video #aphorisms
- [H12] Park bmf: TX-generated block for Mermaid previews — context/https://tx.sh/ #bmf
## 🧭 Table of Contents
- [📝 Summary](#-summary)
- [📖 Main Content](#-main-content)
- [🗒️ Notes](#️-notes)
- [📚 References](#-references)
- [🗣️ Paraphrase](#️-paraphrase)
- [📰 Newsletter](#-newsletter)
- [✅ Action Items](#-action-items)
- [🧪 Hypotheses](#-hypotheses)
- [📊 Methodology](#-methodology)
- [❓ Questions](#-questions)
- [🔮 Future Research](#-future-research)
- [💡 Implications](#-implications)
- [🧠 Learning Styles Assessment](#-learning-styles-assessment)
- [📊 Accessibility Assessment](#-accessibility-assessment)
- [🌍 DEIB Assessment](#-deib-assessment)
- [✅ Logical Validity](#-logical-validity)
- [🛡️ DARVO Analysis](#-darvo-analysis)
- [🎯 Conclusion](#-conclusion)
### 🔗 References
- WordPress Abilities API repository and docs: https://github.com/WordPress/abilities-api
- MCP (Model Context Protocol): https://modelcontextprotocol.io
- WordPress REST API auth guide: https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/
- WordPress Developer Blog and Make: https://make.wordpress.org/
- TX block generator: https://tx.sh/
- A2A agent protocol overview: https://blog.langchain.dev/agent-to-agent-protocol/ *(third-party; availability may vary)*
- Video source: https://www.youtube.com/watch?v=m19VM2yIbHU
## 📝 Summary
- The stream explores the WordPress Abilities API.
- The API standardizes capability descriptions for tools and workflows.
- Stakeholders include core, plugin authors, AI tool vendors, and The WPCC.
- Risks involve permission errors, schema mismatches, and REST exposure gaps.
- Bottom line: describe abilities cleanly, gate them correctly, then compose workflows.
## 📖 Main Content
- The Abilities API registers named abilities with schemas and permissions.
- MCP adapters expose those abilities as tools for agents.
- Workflows chain abilities into user-facing commands.
- Input and output schemas support validation and safety.
- REST exposure is opt-in via flags; authentication is required.
- Server abilities run in PHP; client abilities run in JavaScript.
- The architecture separates description from transport.
- This allows future protocols beyond MCP.
- The stream demonstrates registration, execution, and common pitfalls.
- Common pitfalls include missing categories and invalid input objects.
- Another pitfall is forgetting REST exposure when testing from JS.
- App passwords are required for remote access via MCP.
- These choices improve interoperability and safety across plugins.
- Uncertainties remain around evolving docs and final 6.9 scope.
- The approach aligns with sustainable governance and OSPO needs.
### 🗒️ Notes
#### ⏱️ [00:07:58](https://www.youtube.com/watch?v=m19VM2yIbHU&t=478) Abilities describe actions for AI use
### [H1] Abilities describe actions for AI tools
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “The abilities API defines what abilities of actions WordPress can execute via AI.”
Enables consistent tooling across plugins and agents. Validates inputs and permissions.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=478) #xref #articleseed ID:rw_vid_478
#### ⏱️ [00:09:51](https://www.youtube.com/watch?v=m19VM2yIbHU&t=591) MCP adapter exposes tools
### [H2] MCP adapter exposes abilities as tools
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “We need an extra layer which is the MCP adapter… exposing them as tools.”
Clarifies transport separation. Keep descriptions protocol-agnostic.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=591) #xref ID:rw_vid_591
#### ⏱️ [00:26:57](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1617) Workflows chain abilities
### [H3] Workflows chain abilities into commands
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “Chaining commands together… output of one ability is connected to the input of another.”
Supports multi-step admin tasks and guided flows.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1617) #articleseed ID:rw_vid_1617
#### ⏱️ [00:25:57](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1557) Categories are required
### [H4] Abilities require a category assignment
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “Each ability must belong to exactly one category.”
Aids discovery, grouping, and UI surfacing.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1557) #xref ID:rw_vid_1557
#### ⏱️ [00:24:05](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1445) Schemas and permissions
### [H5] Schemas validate inputs; callbacks gate execution
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “Input and output schemas… and a permission callback.”
Establishes safety and predictable behavior.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=1445) #xref #articleseed ID:rw_vid_1445
#### ⏱️ [02:02:20](https://www.youtube.com/watch?v=m19VM2yIbHU&t=7340) REST is opt-in
### [H6] REST exposure is an explicit ability flag
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “By default… not exposed via the REST API.”
Set `show_in_rest: true` to execute from JS.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=7340) #xref ID:rw_vid_7340
#### ⏱️ [01:44:48](https://www.youtube.com/watch?v=m19VM2yIbHU&t=6288) Execution callback details
### [H7] Execute callbacks must match schema contracts
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “The properties must contain a valid execute callback function.”
Return types must match declared output.
[view highlight](https://www.youtube.com/watch?v=m19VM2yIbHU&t=6288) #xref ID:rw_vid_6288
#### ⏱️ [02:06:33](https://www.youtube.com/watch?v=m19VM2yIbHU&t=7593) Input object gotcha
### [H8] Empty input must still be an object
> [!quote] [Abilities API](https://www.youtube.com/watch?v=m19VM2yIbHU) by [[Merlin AI]] via [[YouTube]]. Published [MISSING]. Accessed {{date:YYYY-MM-DD}}.
> “Input is not of
- Summary: Join me live as we dive into the Abilities API, the foundation of WordPress’ new AI Layer. We’ll explore how WordPress defines and executes “abilities” — AI-powered actions that can be called from PHP, JavaScript, or even external tools like VS Code or Claude through the Model Context Protocol (MCP).
We’ll explore how to register custom abilities, expose them to AI models, and understand how this fits into WordPress’ broader AI architecture alongside the MCP Adapter and PHP AI API.
#stream #english #wp-ai #wordpress-development
- URL: https://www.youtube.com/watch?v=m19VM2yIbHU
[Music]
[Music]
[Music]
[Music]
[Music]
Okay, we are in.
Let me
let me adjust the levels of the sound a
little bit.
Low, high. Okay. Yeah, I think I think it's good enough. Good enough. Welcome to another stream. You know, every week I open the door of my office
to anyone who wants to join while I work on something. I just talk out loud about some topic or just share what I have learned during the during the week. And today I'd like to spend some time working on the abilities API and
checking the the repo, checking the latest updates and just try that out because it's been some time since I haven't tried the specific implementation that has been enabled from the from the repo. This is something that will be most probably be part of WordPress 6.9. So I think it's a good time to to check
what we can do with this with this API. So So yeah, let's go for it. We can go We can go and check the ripple [Music] and we can start um reading some things and very quickly we will start testing the
testing samples. But before we go into that, because it just came to my mind that very recently, for those of you that speak Spanish, I was invited to a Spanish podcast called Freeland Deb with Now I which are some really good WordPress developers in Spain. They are
they are freelance and they have like several projects and we had a very nice conversation about AI. And one of the cool things that came out from that conversation were these diagrams which I'm going to this one for example. I'm going to share this one in the chat. Save to shareable
link. Copy link. I'm going to share this in the chat. See if I'm able to do that. Yeah. Done. Share. And the other one is this G, but I have another one in English. So, let me check. Um, this one. This is just like a a nice summary of the state of AI.
So you can have that as a reference. And as you can see, one of the one of the building blocks of AI is the abilities API that defines uh what abilities of actions WordPress can execute via AI. And in the diagram we can see more or less what's the
what's the purpose of this API. So with the abilities API we can expose abilities of WordPress or or plugins. For example, WordPress will be exposing some abilities, but we also from our plugins, we will be able to also expose the specific
um features that our plug-in provides in a way that AI will be able to directly apply that feature from the LLM. So from our plug-in we can register some abilities and then with another. So these abilities on their own they are not they cannot do anything. I mean LLMs cannot connect directly with um your ability. we need
an extra layer which is the MCP adapter layer which is the which is in charge of um taking the abilities registered and exposing them as tools for LLMs. So the combination of abilities registered and the MCB adapter we will be able to expose any
any feature any capability any anything that our WordPress can do. We will be able to expose that to LLM. It can be what our plug-in provides. It can be custom behavior we can develop um using existing APIs. It can be a call to an external API. So yeah, there's a a new world of possibilities uh open with this with
this feature. And so yeah with the MCP adapter we will be able to expose um tools resources and the elements of uh MCP the MCP protocol what what it expects uh from there. So having said that we can see here
well this um this is not really updated this is more or less h is not accurate because I think it need it needs more more properties. So let's let's go check directly the the documentation. There's a work in progress. Um Jonathan just told me
this morning that let me see. Yeah, that he's actually working on updating the doc. So this is something we should be aware of. This is the pull request he's working on. on. I think it's pretty ready to be merged. Yeah, I don't know. It seems like very very advanced. So, I'm going to share
this. This would be a complement of what actually exists in the in the in the repository as the documentation. And what else do we have? Um, and then there's a there's an issue an issue compiling all the
there's an issue compiling all the additions to this documentation. So, so yeah, if you spot something that is missing or something that is not clear, this is the place to to add any any request to the information on any or any update. So, having said that, let's go and check um
check the documentation. Well, this repository is connected to what are called AI building blocks. This is a I think this is a yeah, I'm going to share. If you're in the chat, you're going to be receiving a lot of lot of links. But uh don't worry if you don't um if you don't have time to check them now because because
after every stream I usually share all the resources that we have used during the stream. I share them in in this repository where I compile all the details for each stream. So um sharing this link as well. So anytime you can come here and check the streams you will have will find
links to the to the recording. You will find the diagrams that we have used during the stream. Um and yeah, anything that we have uh used and that can be um can help with the following of the of the video. Nice, nice, nice. So I think that we have um provided some
context of the abilities API. Any questions? Anybody? Okay. So, let's continue. Um, the handbook I think it links to handbook a handbook project API.
Ah, interesting. And I didn't know there was this AI handbook. This is really cool. This is really cool. Okay, so we have here the AI handbook. Um yeah, this is for now. It's just um
an initial version of the handbook with uh information for contributing to the to the projects via code explaining that there is a specific core AI contributor batch. H this is interesting because it explain specifically the thank you Alfredo.
Well, Alfredo has a Where's the Can you share the link of your talk, Alfredo? I think he has a a talk in what did you say? Um, hi Lucas. How you doing? Where are you from? Argentina. Are you from Buenosire?
Um, Alfredo, please share the link to your talk so so we can add it to the to the conversation as a cafe. Nice. Nice. Did you know that I I lived in in Buenosides for one year and a half Laguna? Nice. Nice. That's in the in the north, right? Ah, Guatemala. Yeah, that was it.
Um okay so this is the talk um if anyone is near this is your way to go to to get updated on what's going on but also after that this uh talk will be available from WordPress TV so so yeah yeah he's going to talk about the the the building blocks of the
the core AI um group is going is currently working on but also some some tools like TX. Have you tried TX? Um let's check. It's really cool. This is a um this is um a tool to create custom blocks leveraging AI. So with a prompt you can create a a custom block. Yeah,
Del is is great. Delredo says is awesome. I have um um but I'm going to share this. Okay. Lucas says he has tested it. Um, have you created any any blogs? You can you can share the the links in the in
the chat if you want. I created um yeah, this one I'm going to share also link in the chat. I wrote about it because experience uh was great. I don't know if you are familiar with mermaid diagrams. Mermaid diagrams is uh something like this.
Mermaid diagrams. Um and we have an editor tutorial integrations. There was an online tool. I don't know is this one. But I don't remember uh needing well I just wanted to show you some examples but it's something like this and you get
diagrams like this and it's something that um if you work with chatbt or cloud code if you are talking about a specific topic I I like to to ask for diagrams of the topic. ICS I'm discussing with LLM and they usually provide those diagrams in this format because this is like a markdown for uh diagrams.
So as I have several notes using these diagrams I from time to time I like to I like to share uh my learnings on my on my blog on on huama.codes. So, so yeah, I decided to create this this um this blog using Intell and and I share here the my experience and it was just this is the conversation that I had. Um create a blog that allows me to
visualize mermaid diagrams on the front end passing mermaid code on the block editor blah blah blah. So it got me a really a really good enough blog for that. Then I fine-tuned the block and I asked, okay, I want to see the preview also in the block editor. So yeah, it created this. This is the conversation and this is the block. And it's great because you can have here the the code and here what what generates. And
and for me it was like it blew my mind. And it was like, "Wow, this is something really really useful because then you can download the the code and you can maybe fine-tune the code if you want to to dis distribute it. But but yeah, it's a really it's a really good good tool." Nice. Okay. So, so yeah, don't miss the the talk that Alfredo is going to to do give tomorrow or check that uh in WordPress from next
week. So, let's continue let's continue with the with the abilities API. Okay. So the purpose of the of the API is to provide a common way for WordPress core plugins and themes to describe what they can do abilities in a machine readable human friendly form. Okay, this is important because
um what we are doing is um providing a description of the um specific capabilities of WordPress in a way that LLMs will be able to to use them directly. Okay. The scope of the abilities API this is also important is the discovery permissioning. It includes permissions and execution uh beta data only.
Actual business logic stays inside the registering component. I don't really understand this. Actual business logic stays inside the um registering component. I see because let me see if there are some examples registering abilities.
Um I guess it refers that the the specific uh code is passed as a as a callback as a function. So, so yeah, this just registers like the the meta data of the of the the ability um which includes things such as a
label. This is the the name of the tool that will be used by the LLM when we uh expose this ability via the MCP adapter. Okay. Then we have a description which will help the LLM to decide whether this is a good tool or not. Then we have a a category
and we need to we need to check what's the what's the what's the goal of this property. Then we have input schema and output schema. This is important because we are like normalizing the the data and and here we can see the the information required for the ability and the specific way the ability is going to return the
the information. Then we have execute callback which is going to receive an input with the same schema that we have defined here. So input here is an object um type object properties array additional properties false. Okay, we need to check exactly what does it mean. Then we have a permission call back
which is important because we are um we also from the ability register we provide a way to to filter permissions and allow the user to execute that ability or not depending on the permissions. This is if I'm not wrong this is the same than the rest API. So, so yeah, here we can apply like any
logic like uh for example if user can whatever and then we have some meta uh property which uh we need to find more about. [Music] Okay. The audience of the ability um of the
abilities API is plugging and theme authors, agency builders and future AI automation tools. Okay. Design goals discoverability. Every ability can be listed, quer, and inspected. For example, the MCP adapter will take the list of uh abilities and will expose those abilities to to anyone that uh requires uh them. Interoperability. A uniform schema lets unrelated components
compose workflows. This is um super interesting. Let me see if I can find there was a um there was a um really good conversation about uh compos ability. Um
Um, okay. Let me see if I can do a compose a workflows. Yeah, this is what I wanted to share. Share this as well.
and to also share this by the chat. So this is a proposal but I think this shows the the possibilities of the the abilities API. So this is provides an overview of the elements that need to come together to unify admin commands, shortcuts and AI assisted workflows.
This is an important idea, the idea of workflows. The overlap between these initiatives provides a good funing function to think about the architecture underneath and the different shapes we need to construct. Um so what's important about this is that the abilities API is not only for LLMs you know uh but it also
describes uh capabilities that can be used for example as a as a command in the command uh in the command palit or we can connect like different um abilities together and this is the the proposal of a new API. This is uh I don't think there's nothing specific uh implemented but it's
a view of the future and it's uh connected with with this idea of uh interoperability. So let's talk a bit more about this. Yeah, the basic prop proposal for a workflow's API comes from the need of for chaining commands together with user input along the way. So imagine you have several abilities and you connect them
um one after the other and you compile them under a command. So with one command you can execute like several abilities together. So the output of one command um is connected to the no uh the output of one ability is connected to the input of another ability. You can chain different different abilities and create a a command. Chaining commands together with user input along the way. This has come up often in feedback
around the command pallet extensibility. Yeah, this is super super powerful. Even simple triggers like create a page of a need to incorporate steps such as a model with titles like fields for the user to interact with before going into the page editor or the template creation flow which exposes a grid of available theme template rows to start from. So yeah, this is uh some examples of how you can change like different different
actions and these actions can be connected to a specific ability or not. You can connect it to to some other things. We should think of workflows and abilities in a similar way to how we think of blocks and patterns. Well, I repeat, I think the the the abilities um concept is tightly related to the workflows uh concept. simple units that can be combined into into bigger entities. Blocks put together can form a
pattern and multiple abilities can be composed into a workflow. Warflows are then chains of abilities possibly requiring user interaction via phone controls on the way to specify input or feed into the next ability. Yeah. So, here's the conversation. Here's um this is important to to be taken into account. Okay, this is from yesterday. The initial plan was to move WordPress
abilities from the AI team repo just before 6.9 beta 1 and ship it through the existing mpm packages system to WordPress core. However, the priority is to land server side changes first. Let's see if we can still wrap up PHP part early enough to include the client too. Either way, we should move the development to Gutenberg to simplify integration with the editor and the common pallet
WordPress abilities. Okay. Is this an MPM package? Let me check that. We check this. No, it doesn't seem Maybe this is a working. Well, I maybe it refers to the repo.
Yeah, from the a team repo and ship it through the existing mpm package assistant to WordPress core. Okay, these are implementation details that um are not in the scope of today's session. Okay, interoperability. A uniform schema lets unrelated components
compose workflows. This idea of workflow is like the the future possibilities of the abilities API. And this is important because this explains why there's this separation of um responsibilities. On one side we have the responsibility of registering abilities and on the other side we have the responsibility of exposing those abilities as tools for the LLMs. In some other
MCP servers these two things are shipped together. There's no different layers, but WordPress um the WordPress team, the core A18 has decided to do this because it's more future proof because the abilities will be there. They can be connected to to more to to other things uh than an MCP server and
it can be they can be connected to to commands. They can be ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ch ched together with uh and form a final workflow but also they can be exposed to the the current protocol which is MCP model context protocol but the idea behind this is that maybe in the future there's another protocol which is called MCX I
don't know uh so with this architecture Sure this uh the implementation becomes future proof because whatever the protocol um appears in the future um the need to register specific capabilities uh is something that didn't exist before in WordPress and this is like agnostic for from the specific use we we we
want to give to to these abilities. this. Okay, let's continue. Security first explicit permissions determine who what may invoke an ability. We saw that here. There is a a permission callback that is required is is not optional. And then gradual adoption ships first as a composer package migrates smoothly to
CO. Okay. And here we have there are two repositories which may be confusing because the first one that was created um I think okay this repository will be
depre will be deprecated. as the abilities API AI built-in block for WordPress continues releasing a stable versions and becomes a core API in WordPress uh 6.9. Okay, we encourage users to migrate to a API. This was the first repository that was created. But this just contains um like
the the the ideas and the specific Yeah, the specifications. That was the word that I I I couldn't find. This contains the specifications. I s some some tests, some initial drafts, but the work that that is actually in in progress and
meant to be merged into core is this one, the WordPress slash abilities hyphen API. Okay. inspiration WVP feature API command palit and modern AI assistant protocols MCP A2A what's A2A
um Does anyone uh know agent to agent
protocol sometimes called uh announcing the agent to agent protocol. Yeah, this is from April. um a new era of agent interoperativility. Okay. Today we're launching a new open protocol called agent to agent with support and contribution forum. Uh
okay. How does it work? We have a remote agent. We have a client agent. secure collaboration. Um, okay. I think this is related to the yeah to the communication with remote agents. Right now, I think this is my
understanding. When we see diagrams like this one, we're talking about client AI agents which can be um cloud code cursor um copilot. But there's also the idea of remote agents which is this idea of okay you um
you throw a command you you do a request and then the agent works like maybe during the night to get you something and it h and they can connect with other agents. So this standard I think it's a it's a standard to to enable this communication. Mhm.
Okay. This is a a real example candidate sourcing. Can we increase this? Right click to be in a view tab. Open video in tab. Okay. So we ask here and hiding attaching. Can
you help me fill the role? And so it starts. Okay. Initiating a agent protocol to discover agents capable of candidate sourcing based on available agents. Okay. So it asks [Music]
Mhm. I see. I see. So is the is the communication with other agents from our agent to other agents. what we are working now. What we are um this is the the like the way we can expose
uh function functionality to LMS to client agents but then this AI agents they can connect with other remote agents to do some other stuff. [Music] Mhm. Okay, so current status placeholder repository spec draft created. I think the spec draft is uh here in WP feature API prototype plugin and composer package community feedback created code proposal in progress initial create. Okay, how do
you get involved? Great. Let's go to the um what's the abilities API uh provides a standardized way to register and discover distinct units of functionality within a WordPress site. Um let me see we have time to to try things but I want to go as far as I can the documentation. These units call abilities represent specific actions or capabilities that
components can perform with clearly defined inputs, outputs and permissions. Okay. It acts as a central registry making it easier for different parts of WordPress third-party plugins, themes and external systems like AI agents to understand and interact with the capabilities available on a specific site. Yeah, this is this is a a very important idea. So core concepts, the ability is a distinct uh piece of functionality with a unique name
following the name space ability name pattern. Um where's an example? Yeah, here name space. This is the I'm going to put this here. I'm going to open this here.
Each ability has a human readable name and description. Input output definitions. So, we have uh a name and a description. Input and output. A category assignment. Optional permissions. I don't think they are optional. I think they are is required. So well optional permissions in the sense that we can return true um and it will
be available for anyone and as an an associated callback function for execution each register ability is an instance of the WP ability class. Okay, let's uh dig a little bit into the code and let's see where's the um this API. Is this defined here? Yeah, here it is.
Okay, so here's the class. Um so we have uh protected name all the all the properties we use to register the specific. So each ability is an instance of uh this class and the construct
string name and the and the arguments. And for each property we yeah we need two [Music] properties as a property name property value this prepare properties. It should be another
yeah this one. Okay. It checks that it contains the specific um specific properties required. Then we have h a function to get name to get label get description. So yeah this is just registering a meta data and we have uh
once is defined we are able to validate the input which is something it will be done automatically somewhere let me check yeah check per we check permissions and yeah when we check permission permissions. We check if it's valid has permission.
We check if uh uh do execute executes the ability um call back. So it checks that we can actually h execute the call back and if we can we we do it we can we have functions to validate the output executes executes the ability after input validation and running a permission check
uh before returning the return value it also validates the output. Yeah. So this is where everything um gets together and we do the the execute. Yeah. Do execute and um validate check permissions and so on. Okay. Nice,
nice, nice. Each registered ability is an instance of this class that we have just checked. Okay. Category. A way to organize related abilities. Each ability must belong to exactly one category. Categories have a slack label and description. Each register category is an instance of a Dolby VP ability category class. Okay, let's check this.
[Music] Ah we are here category. So each category is an instance of this class registry a central singleton object that holds all registered abilities. It provides methods for registering and registering finding and quering abilities. Similarly, WVP abilities
category registry manages all register uh categories. So if we come here and here with this API this is registry.
Maybe we can ask compiler to um Okay. Um give me give me a list and brief explanation of um methods available for instances of this class.
[Music] Give me list of uh properties methods uh available for instances of this class. Okay. So the abilities registry cannot be extended. It's just an internal singleton tone. You retrieabilities properties static cell register
abilities public methods register. So we register an ability using this singleton instance reges a new ability and returns the WP ability instance on success. Validates the format format of each ability. Uh we can unregister. We can get all registered. We can see if is registered. Get registered.
These are public methods. Then we have static methods like get the instance returns the singleton uh instance. Okay. Wake cap. Okay. Behavioral notes. The class implemented as a singleton. So only one instance is uh created. Okay. Nice. Nice.
Okay. Call back the PHP function or method executed when an ability is called. Yeah. WP ability execute schema. JSON schema definitions for an ability an ability expected input and it returned output. This allows for validation and helps agents understand how to use the ability. Permission call back. An optional function um that determines if the current user can execute a specific ability.
Name space. The first part of an ability name before the slash typically matching the plug-in or component that registers. Okay. Goals and benefits use cases registration example. So we can okay so first we can register a specific uh category using the action. Okay these actions are documented somewhere. Let me see
let me see if we go to dogs. Yeah, hooks going to include this new document. Yeah, here. Um, okay. So, we have abilities API categories in it fires when the category registry is first initialized. This is a
proper hook to use when registering categories. So, abilities API categories in it and then abilities API in it. Maybe this and then we have abilities API in it. [Music] I getting started.
Um, I'm going to to add some quick notes. [Music] So, I think that in the hooks page, we need to also add the abilities API in it. [Music]
This is the the getting started. [Music] So um talks getting started. Yeah. So this is WPL install and we can install directly from here. Nice. With
WPM from here is this uh if we go to WordPress.org bar plugins, do we have the abilities API? I don't know. Let's find out. Abilities um abilities API
this API no we don't have uh that but in theory we can we can do this from WPM so we can use it as a plugin the easiest way to try and use WDPA is to install it as a plugin by download it by downloading the latest release from the GitHub releases page of this repository. Nice. Or as a dependency, plug-in authors and developers may wish to rely on the abilities API as a
dependency in their own pro projects before it's merged into core. You can do that in one of the following ways. We can use the requires plugins or we can use it as a composer dependency. We can also check availability with code. Um so when it's available uh we can implement our code. So we can say okay um if WP
ability class exists if doesn't exist we can add a specific notice that says this plugin requires the abilities API to use. Please install and activate it. And we can also check specific versions of the abilities API using the Dolby abilities API version here if it's defined and if the version is whatever we can also uh display a message. So basic usage example uh the below example
is for a plug-in implementation but it could also be adapted for a themes function PHP. So this is a callback that just return my blog name like the name of my site. Then we have an action that we can uh hook into the abilities API init action which is the right hook to
to hook the function that will register the ability. And then inside the function we use the liability with a name and a specific array with specific properties such as label, description, input schema, output schema, execute call back, permission call back and ma. um
API abilities registering abilities client registering categories registering abilities. So the meta is an associative, this is optional, is an associative array for storing arbitrary additional meta data about the ability annotations. An associative array of annotations providing hints about the abilities behavior characteristics supports the following keys.
Ah, I think this is information for the LLM because for example, if it's destructive, um, is something that the LLM wants to be informed about. So, we can say if it's destructive or not, whether the ability may perform destructive updates to its environment. If true, the ability may perform any type of modification, including delations or other destructive changes.
This is also important showing rest whether to expose this ability via the rest API. I guess that if this is not true, we won't be able to call the ability via JavaScript. So I think this is something to be taken into account. Maybe we can confirm that in the docs JavaScript client.
[Music] Okay. The JavaScript client enables uh front to interact with the API system. It can discover all registered abilities. It can execute serverside PHP abilities. and it can register and execute client side JavaScript abilities. This interesting idea we can have server side
PHP abilities and we can also register um client side JavaScript abilities. Okay. Core API functions. Core API functions we have get abilities returns an array of all registered abilities both server side and client side and register ability.
Interesting. Interesting is it follows the same format but it uses a different function. Name label description input schema output schema. There should be call back permission call back. Okay. So it pro this provides a list of the of all the abilities. We can get a specific ability given a a
name and this will return a specific object. We can check that later. um categories. We can get the ability category for a specific ability. We can execute a specific ability that will return something specific. Um register ability registers a client side
ability that runs in the browser. But okay, we can execute from JavaScript. And this is interesting. We can execute uh let me think about this. From JavaScript, we can execute serverside PHP abilities, but also we can execute client side abilities that are only available from from JavaScript.
[Music] Register and execute. So execute an ability with the provided input data. Okay, we can try this.
So let's start trying things. What we can do? Let's open Let's open studio and let's come here. Let's go. streams.
Going to use this one. And what we can do is we can go to cursor. We can go to plugins.
um no this is not ah yes okay so streams uh sorry because I have another project for the streams info so okay Let's open this in cursor.
Now we are in the streams project. So if we go to WP content uh plugins here um okay I have I have here some plugins. So um what we can do is to we can
clone the abilities API repo here And maybe we can create another plug-in later for checking the So with this this is uh this is a plug-in that is installed and
once is enabled we will have access to the API to all the all the all the functions to register and ability So with that what we can do is um we can this API and here um
well let's Um take test stream abilities API and also we are going to create a touch
plugin PHP. So now we have now we have the ability API which will provide us the all the all the functions we need to register to list and to access the um the abilities and then we have here our custom plugin that it does nothing what I'm going to do is um I'm going to
go to uh plugin and fan book. I think I only need I only need the plain name, but so yeah, header requirements. Okay, we only need this.
This is going to be Yeah. Okay. Let's let the AI to do to do its work. So now if we go to our WordPress instance plugins
we can activate abilities API. We can activate this streams abilities. Um, okay. What did we do wrong?
here. Okay. So, now let's let's register some register some some abilities. Get started. [Music] basic usage example. I'm going to copy this
and to come here. Okay. So this code this is the callback function for all ability which is called my plug-in gets site title. Okay. It's recommending to add this, but I don't think we need it for now. This would be a good
practice, but let's stick to the example. Then we add a specific action every API in it. And with this function, we register the specific ability, which is this one. Get site title. [Music] Ah, we have this.
Okay. So, okay. This is closing this one. This is closing this one. This is closing uh This one.
Ah, okay. And then we have the the return true. Yeah, we don't need
What's going on here? Let me see. Um I have this I don't know syntax error expected token why
we have Peace. Okay. Yeah. Uh simple.
Yeah. Can you tell that I come from JavaScript? Okay. So, this um seems to be right. Okay. And then later you can retrieve and execute the ability and abilities. WP get ability
ability not found. I see. So we should display this um somewhere. But what we can do is we have here the backlog.
Maybe we can also also the back. This Okay, let's see what happens if we go to if we go to or
so I don't see the echo. But here
uh Okay, let me see. Are these errors new?
Ah, the ability properties must contain a category. So, example is wrong. And let's check the PR of uh Jonathan because maybe that's the updated
dogs prepare. This is the PR. Let me see. Files changed. Okay. So,
okay. So, these files uh have been removed. But now we have getting started and [Music] getting started file rename without changes. hooks intro PHP AMI [Music]
uh view file. Okay. So, okay. So, the example there was another example with a a category I think um dogs Okay, I'm going to add a note. Um,
review review examples. Review examples. I will create then issues or I will tell this directly to Jonathan. review examples uh to include categories as is a requirement requirement. Okay.
So now there was an example there was an example with a a category. Where was this? This one ah in the intro. This is the example. Let's copy this and can come here to plugin. Yeah.
So now we have a category and our ability has a category. Mhm. And showing rest true. So, we should be able to uh access this ability from JavaScript. So, let's go to our WordPress installation. We're going to reload
and let me see. Okay, no errors. So what we can do is um what we can do is first try to
let me see what was the PR [Music] [Music] I have a lot of let me close this because this is just like documentation pages
and I'm going to okay this is an example but then in docs have the JavaScript client And but let's also check this PR because this must be more updated here. There's JavaScript client which we are going to use as a reference because this is the the more updated. Okay. So
import get abilities from WordPress abilities. Let's see if we have this available from the DBP package first. So if we go to the console um ZBP
not here but maybe in the block editor uh here. So not here as well. So we need to create custom custom code.
Um and we should be able to let me think about this. Thanks for mag to catch with Okay. Um yeah, bye Alfredo. Good luck with the with the talk. Stefan, abilities API. Yes. Yes, we're talking about the abilities API. We are um re reviewing the documentation and testing the the API. This is a work
in progress. So we are also taking into account the latest uh PRs open for the most updated uh documentation. Okay. So, yeah, talking about the API, if you want to follow, here we are. What else? Um
so we have registered a category, we have registered an an ability and what we want to do is to check the we're going to check the JavaScript API which was what was this here. So in order to do this we need to
we need to create this uh JavaScript. We need to check this um we can create a block or we can create a JavaScript with a build process and we can load that in the the block editor. In order to do that, we can create a uh we can create a JavaScript.
Okay, let me see if we can do that. So our plug-in our plug-in what we can do is um we can define okay let's go here and let's do mpm init this will create
this will create uh package and then what we can do is mpme WordPress scripts. So this will add the dependency and then there was uh let me see in the block editor
um here block editor the block editor um [Music] there was a reference guide blocks API reference no how to guides blogs in queueing assets in the editor. Okay.
Mhm. So what we can do is in the editor. Mhm. So maybe we can do this.
Can do this. um in our code we can in Q script we don't need the style and um uh it is this API scripts and what I'm going to is h build indexes this.
Okay. And then we have here a JSON. And what we can do here is open an SRC folder with an index um with an index.js folder. index.js file. No.
We are going to open an index [Music] file inside here. And what I can do here is maybe copy and paste these examples. And then what I can do is um let me see if
here. Mhm. Okay. Um nice. I can remove the PHP part for now. But um
so now we can do mpm rune uh build. Okay. So, I don't know if this uh maybe this is
not still. Let me see. MPN. No. Okay. So, maybe this is not implemented yet. Let me do more digging.
So packages client. This is the client. Okay. This the client is currently available as part of the composer package. When the abilities API is installed, the client is automatically registered
and in quue in the admin. Um, in theory I should be able to to access but from where?
Um, okay. So no idea or import uh getabilities getability from WordPress abilities uh purpose abilities. Let me see the client.
So is this one? But it hasn't been okay. Development and testing. No. [Music] H
okay let's do one thing I have this here and I have the package here and I have this here. So maybe what I can do is to directly here get abilities from Yeah, maybe I can do this. Or no, I may
need to I may need to go to Let's open another one. So, so the thing is that I don't I haven't found a way to make this work and WP abilities is not working for me. So, I have
the plugin installed, but I don't have this WP abilities anywhere. Maybe it's uh not in the dashboard. Not in the here in the um Yeah, it's not here as well. So, let's move on.
I'm going to try to um I'm going to try to to go to content plugins abilities API. There's a package JSON here. Let me see what this contains. the packet JSON.
Okay. So, we can build the client from here. So, let's do that. Um, first we need to install dependencies here. Then we will run the build. This will create in theory the
mpm room build the build version of the of the package. If we come here to build, we have this here in theory. We can then come back to our code and say abilities API. Yeah, this.
So now if we come back here and if we do uh clear MPN room build from our plugin
it seem it seems it worked. So now in plugin if we
store ability So there's a store there already registered but it's not available through DBP. Ah, it's there. But maybe it's because I have incued this script.
[Music] Okay. So, it's here. I don't need I don't need I don't need this. I don't need to incue anything. So it was there. I don't know. I don't know if that. So now here what we can do is
to I can in Q. Okay. I can I can do this and I can do this. So what I can do is I can encure the script but I'm not going to use any build. So I'm going to remove
this. I'm going to remove this and I'm going to remove this and the package JSON. Once I have checked this work, this works as expected. I'm just going to remove it as well. So, let's um
Yeah. And the the plugin should directly load indexes.
Okay, let me see. Cube block assets. [Music] blue.
[Music] [Music] Okay. So, this should work. Uh [Music]
[Music] yeah. [Music] [Music] and
[Music] here [Music] it's trying to load this but it's not [Music] Okay. So, let me think about this. Okay.
Src, let's put this here. Move. Going to remove this package. JSON. Let's remove it as well. This cannot use import um ah mark. Okay. because this is cost.
Um okay, await is only. So what we can do is const um do something
with abilities. We can wrap everything in a sync function and then we can call do something with abilities. This is because we are using a weight and a weight can only be used inside of an async function. So this should do the trick.
This should do the trick. Okay. Um and Yes. [Music]
So plugin we have this. If we go to source and we go to plugins abilities API index.
Yeah. here. Maybe content plugins. Um, no, this is not ah this one. Yeah.
So, okay. My god. Oh my god. [Music] So um
what's going on? We have here okay let's not interested in this. We are interested in this and we have a function that first of all let's see if we are executing this console log. Um, hello. And also console log
VP abilities. Uh, so this is working. This is working. and the abilities get abilities.
So we are not getting this is working but we are not getting any abilities from JS and in theory if we go to the documentation of the client.
This should return all registered abilities. Um, let's go to relax. Ah, we have here an abilities store. Nice, nice, nice. Yeah, there are no abilities here.
So, yeah, I'm not sure. Maybe the JavaScript API for abilities can only access the abilities registered via JavaScript. M.
So there are no abilities here and we have registered this one. So, what I can do here, what I'm going to do here is um I'm going to log something in the debug.log by using the server side. Let's see if
by using the server side API, the PHP API, we are able to we're able to list the the abilities. So with dogs and using abilities. [Music]
So what we can do is sighting for ability. here
my plugin site info my plugin site info. So what I can do is um I'm going to for example
Okay. But now if we go to the backlog, [Music] site info, ability not found. So something is happening with the abilities not being registered properly. Um uh the WD properties must contain a
valid execute call back function. Please refer to um okay. So we need to execute call back. Okay, I think we are going going well.
the execute call back my plug-in get site info uh because because we haven't defined that Um
okay. So what I can do is to create the function here. So function
and this must the the okay. uh make this function uh returns an array matching
the output defined above. Okay, so we have site name string, site URL string, site name string, site URL string, active theme.
Um, so string they are all strings. things.
Okay.
Okay. So, it wasn't fine, but it was it was okay. It was okay. And and now if we go to our WordPress installation, let's see what happens. Yay, we found the ability. So no conclusion from JavaScript we are able
to we have been able to we have been able to access the specific ability and also here. But now here we are not able. [Music] If we load function was called
uh because maybe the name is not right. We have registered an ability called my plug-in site info and we're looking for my plug-in get site info which is not correct [Music] but in JavaScript
we can we can try a few more things. There has been a critical error. Uh
okay. Plugin site info and the plugin site info. [Music]
[Music] Okay. Because is You know what? I'm going to call this
get side info. So, uh, why it fails? But anyway, my plugin site info is the is the name of the ability. And
and this is where we get the ability. [Music] Right.
Okay. Let's remove this. Add too few arguments to function. I think it's because I think it's because um we need to
active plugins PHP version WordPress version
So permission call back can I return just true? [Music] So, I'm going to simplify this.
And I'm going to simplify this. So that wasn't the issue too few aramentments.
Okay. So the input schema it needs to have something. Um maybe this is maybe this is due to [Music] Yeah, this cannot be empty.
Let me see if here there's an updated example of HP ABI file. [Music]
Mhm. [Music] This is the one I want. Now we come here. [Music]
Okay, we return name, description, URL. [Music] Name description URL name description URL.
So the input is an object with properties HTML properties false and read only destructive false. And we can check if um maybe the JavaScript doesn't work because we need to set this meta property of race API. But let's try this first to see if we can avoid the
the the PHP error. Okay. Okay. And and the category is not registered because the category we have registered is this one. Uh
h ability my plugin site get site info. This one is my plug get site info.
So let's Yay. Oh, yeah. No. Uh, it's an error object because my plug gets info has invalid input.
Maybe this is it.
Yeah, that was it. Um we have uh streams description URL and um I think we don't have a description but if we add here a description to settings general tagline. Okay this is this is a demo
demo description. test for test. Save. Okay, this is the description. Nice. But JavaScript cannot access the
the ability because if we go to network fetch and we um ah because we have this filter. Yeah. Let's ability.
So we have asked for the abilities in this API but we haven't got anything. So let's check the JSON.
Oh. Um. Okay. It's here but maybe I don't know. So it's exposed but JavaScript cannot
access doesn't have access to it I guess because of the rest API. So let's uh check that. We can go and see in the documentation [Music] here in intro. No, press AI. This is the one we want.
Let's read more about this. We're fine. Okay. The WordPress abilities API provide rest endpoints. Access to all abilities rest API endpoints requires an authenticated user. Access to execute individual abilities is restricted based on the permission call back uh of the ability. In our case, in our case, we don't have any restriction here.
Controlling rest API exposure. By default, registered abilities are not exposed via the rest API. Uh registered abilities. So what? Okay. So what do we have is the the common the common press API endpoints but the specific endpoint for the specific ability is not registered unless we do showing rest true.
So the ability is listed in rest API responses and can be executed via rest endpoints. I get it. So we need to showing rest true. Showing rest true. And now if we go to our WordPress site,
we go to console. Now we can see the ability. If we go to network, we can see that the specific ability is there. And if we go to the JSON,
no site info. Okay, let's go to um abilities. A B this. No, we cannot access this directly.
Um and we cannot access because we need um we need what do we need? These are the response headers. We need a uh do we need
Okay, I need a nons and and a cookie headers. But there's no cookie here. There's no cookie here. But if I go to streams WP local
[Music] okay so yeah um let's summarize a little bit what we have done today and from there maybe we and try to finish the session executing the
abilities API. So what we've been able to do is to register uh the ability to execute that ability from PHP as we can see here to also check the register abilities from
JavaScript. And now what we could do maybe um what we could do, what we could try to do is to execute execute the the ability by executability.
Mhm. Okay, let's try this. If we go to our JavaScript here, we have the abilities. So, the number of my ability is
my plugin get site info. Okay. So executability here we have um we have name, description, URL. Uh
yeah, I don't have this ability, so I'm not going to do this. Executability is not defined because we need to also destructure that function from
um input is not of type object. Okay. because execute ability um an empty array maybe uh so executability let's check ah yeah the second parameter is the is
the the input of the function so yeah let's try this again input is not it's an object because if we go to the input schema type object. Yeah. So we need to pass an object even
if it's empty. Okay, let's go again. Um, input is not of type object.
input is not of type object but here we are passing an empty object by plugin get side info by plugin getite info we are defining type object without any properties so it's empty so in theory Okay, it should work.
Execute ability. [Music] Um, okay. Let's dick. Let's go to the ripple. We can come here and and see. Let's look
for the error has invalid input already has invalid input. So this is validated value from schema input ability input schema. Yeah, that's the thing I don't know exactly how this translates to. So we can um if it's empty it doesn't work
an object empty object should work um because in plug-in in PHP what we are passing is an array but here passing array is not working
is not working. And let's check the okay now we are stuck here because somehow we are not able to pass the the required
input data. get site title. And here we have this. Okay. Maybe maybe if we go to the
redux have here the if we go to the abilities and
Yeah, because I have a lot of pages open. Okay, this is the abilities by name. input [Music] schema properties.
So if properties is an empty array, what I can do maybe is to not move it. Because if doesn't accept an object, it doesn't accept like an empty object. It doesn't accept an empty.
Okay, let's check something. going to this. And so what if I just input a schema can be null maybe
and here this can be full. [Music] Let's see. No. Why? Because it seems that return value must be of type array. So array empty.
And if we no code argument too few arguments to function. So now this was yeah the input thing I'm not this in theory is the way to pass an empty object empty array.
So now it should work on the server side but on the JavaScript side we are not really able to. We are not really able to execute this
because we don't know exactly ability invalid input data reason input is not of type object. But if we from JavaScript we execute ability and we pass an object
it doesn't work either. So I don't know exactly what's going on. Input is not of type object. Is this something that is uh maybe there's an issue open? Let's check
closed. [Music]
Okay. Okay. Okay. I am stuck here because the the thing that is happening is that we have the ability register. We are able to execute it from PHP from JavaScript.
We have we can access the we can access the the ability but we cannot execute it because the input schema is this one in theory is just an empty array at least this is the way we are executing this from PHP but from JavaScript Good. [Music]
Um, okay. I don't know. I'm completely blocked here. What we can do is to
maybe go to here we can see if we can access this ability from the LLM. So the last thing we are going to do is check the MCP adapter. in WordPress. If we go to
if we go to MCP adapter, we have this one. So I can clone this repository here.
I can here plugins get clone mcp adapter. Then we can go to our WordPress installation. We can activate the plugin. The composer autoload was not found.
Okay, we need to run composer installed. NCP adapter composer composer install. Okay, that's a nice error message.
So we have the server that in theory is already exposing the abilities API. Now what we can do is in the client in the client
the client we need to to install the the MCP client. In order to do that, where does okay had here a G? We go to guests and we check this.
This is the client. Corso. Okay. So in cursor, how do we add MCP?
Open MCP settings and new MCP server. Okay. And in our case, my side is this one.
Okay. So, it's connected. Can I check the I check the tools? No tools, prompts or resources. So, nothing is happening.
There should be there should be at least one tool. I don't know if I need to do anything else. The I think it's it's automatic. Um,
I don't think I need to pass anything else because I'm not using any I'm not using any um private information. So this setting should be enough.
This should be enough. Um, okay. Let's reload tools. There should be at least one tool uh shared by this. Let's check and with this I'm going to to finish the session. Um
here Jonathan Bosinger did a workshop the client. Okay, this is the Okay, this is for
Okay. Um, oh, this is right. Arcs name type command MPX arcs the same and the end
WP API URL is this one. So, so yeah, it's not working. Maybe I can check here the back console output CP
uh validation fail. Oh. So, so I I need Okay. So let's create the let's create this uh API URL and then
and then API username admin and if I go to my local Settings, password fet failed.
I'm going to uh reload window. Oh no. Fetch fail. Fetch fail. Yeah. Okay. I don't know. This is this is failing. But um we are close. There should be something
there should be something we need to take into account. But yeah, this is a work in progress. Um, I'm not sure. Um, but we are this close to uh get our ability connected to to the MCP. There's a fail.
You know what? I'm going to I'm going to take this. No, I'm going to to take this and I'm going to go to the repository which is this one, the MCP. I'm going to say I get this error from cursor.
Let's see. Let's see what happens. Um I know because okay it should be an application password.
It's not a password. It's an application password. So if I come here I create um a test MCP at application password. I copy this. Then I come here and this is my application password. Now [Music]
I load the same error. three. Um
this NCP. Yeah, it's this one. And in my backlog, make it in something.
There's no there's no error here. I don't know because I don't know the fetch fail
and And um [Music]
do I need to add this So if we go to here,
[Music] [Music] So, you're going to have to change yours to service. Okay, we are fine with that because
um should be fine. >> We need to add this. Need to add this. So,
so if we go here, we need to NCP [Music] Yeah. Experiment.
um SCP adapter.
Do we need to create a we need to create a a we need to create a server. Okay. So let me
MCP adapter in it. That was a missing part. So if we go to NCP adapter and if we look for NCP adapter in Item. [Music]
[Music]
So we come here And
I'm going toong, but I want And we have already the ability because admin.
Okay. So, if I do this and if we go to our WordPress installation here, there are no errors.
But then um We should be able to doll AI experiments. WP JSON. Um, we should see
my name space. Okay, my name is space. Fine with that. And if we come here, we just say WP JSON my name space MCP.
Somebody was in a workshop yesterday. >> Okay, this is as far as I can I can get. Um, so my name is space
this is working and uh I have the MCP. So this is fine. Ah, okay. We are getting closer. Um, my plug-in my ability. No,
this is the So, this is my plugin. Get site info. my plugin site info. So we are pretty close having this working. Posts hello world.
Okay, fine with that. But if we go to cursor and if we reload,
no, no, no. I need this.
So there are no errors. The MCP server here is is running. At least we have the right URL. The name space is created. I don't think we need anything else here.
um unique server identifier that's fine my name space server recipe root space blah blah blah transport method rest my plugin site info and this is the ability we have uh created here my plug-in in
get site info abilities to expose as tools. So in theory we should have here found one tool but we are not getting that because of uh we don't know why we don't know why. Oh. Um,
>> running a number of tools. I think I might know what >> uh I like that log log file. So, we can add here a we can add here a log file. So, I'm going to say log log file. Um, okay. What I'm going to do is this one.
Um, copy path the backlog. Yep. Uh
node. Okay. Troubleshooting. Ah, we have a troubleshooting section. H. Oh my god. Ducks. Troubleshooting. Common issues. Yeah, I'm there
in the So, we need to go to the client MCP. Okay. MCP WordPress remote is MCP.
This is MCP MCP MCP WordPress removed. Yeah. And here we have a docs. Here we have a troubleshooting and here we need to add this
reject. >> Okay. Mhm. Nice, nice, nice. Okay, we are getting closer. Uh, where's my SCP lock?
So fetch failed.
So if we go to if we go to users we go to admin have our MCP but I'm going to revoke it. Okay. Test two copy
[Music] and ncp JSON. So sorry you are not allowed to do that. [Music]
Then so WP API URL, WP API username, WP API password admin, uh HTTPS streams WP local JSON AI experiments space
CP
[Music] Okay. So, the fetch failed.
What I can do is maybe I can stop the side. It shouldn't be necessary, but it's checking my options streams. Then here I'm going to
clear the output reload window and also Yeah. [Music]
MCP and I have more errors here. the backlog. I don't have errors.
[Music] Open up your GitHub. See
That's That's
I don't think it's done.
Mhm. just get back to my experiments. AI experiments in CP. Okay, let's check the code to see if something something
ID. This should be my NCB server.
My plug is said get site info. This is the one that I'm registering. So yeah, I don't know exactly the MCP. [Music]
Okay. Okay. Okay. Um, I am blocked. I don't know how to continue. Theory, this should work. Have this. Okay, let's remove this. Okay, it's failing for some reason. And the MCP log
The MCP log is not a it's not MCP log here I have the animation.
Okay, maybe there is some change. I don't know. I need to I need to review this. But uh yeah, we have been able to to go um to go far. We have been able to register
the the ability. Okay. What have we done? We have been able to uh register a category, register an ability. We have been able also to create a server, an MCP server. uh that um exposes the specific ability although we haven't been able to to detect that from from cursor also from
PHP we have done a quick test of executing the specific ability and from JavaScript we have um confirmed that we um have access to the abilities register via PH PHP although we haven't been able to execute uh that ability from from JavaScript but I think um
on the ability side there's still some work to do there's alen some documentation update so yeah it's a work in progress but uh but uh yeah there are a lot of things that uh we can do and by the time of the warpress 6.9 release I think that we will have h all these things more consolidated and we will be able to start applying then to to appliance. Okay. So this is all for
today. Um hope you have a a a great weekend and see you see you next week. Uh, as you know, I I do streams one week in English and another week in Spanish. Um the streams are all um my codes will be or they are all available
here in my in my YouTube channel which is Jama codes and then in this repo I have compiled all the info for all the streams. These are streams related to WordPress development and with a specific view of the JavaScript side. So yeah, uh join me next time if you want
to to to to help me and to view how do I get stuck in things. Okay. Um thank you Lucas. uh we weren't able to to finally connect the the ability to the to the len, but I think we are pretty close. There's something uh a little detail that we have been missing, but yeah, we are we
are almost there. So, yeah, have a great weekend and see you any other week. Okay, bye.
[Music], Abilities API, JuanMa Garrido, 01k81c9z99g561z7bg8vskdtr0.