Model Action Protocol
What a model can do lives in /actions. Each action is just a folder with two files — no server, protocol handshake, or dependency to install.
actions/
send-refund/
index.json
index.js
index.json tells the model what the action is:
{
"name": "send_refund",
"description": "Issues a refund for an eligible order.",
"params": {
"orderId": "string",
"amount": "number"
}
}
index.js is your code, running in your repo:
export default async function sendRefund(params, ctx) {
const key = ctx.env.STRIPE_SECRET_KEY;
return { refunded: true, orderId: params.orderId };
}
No MCP server to stand up or integration to configure. If you can write the function, the model can call it.