/webda:webda-operationsfrom webda
Exposes service and model methods as operations via REST, GraphQL, gRPC, or MCP in a Webda app. Use @Operation() to make methods callable by clients.
Ships in webda. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Making a model or service method callable by clients, or adding a transport.
@Operation() on a service or model method declares an operation. Every enabled transport exposes it: REST, GraphQL, gRPC and MCP read the same operations, with the same input validation (from the TypeScript signature) and permissions. Models also get create/get/update/patch/delete/query operations automatically. The operation id of a service method is the service's configured name in webda.config.json, capitalized, then the capitalized method name: GreetingService.Greet when configured as "GreetingService".
import { Operation, Service } from "@webda/core";
/**
* @WebdaModda
*/
export class GreetingService extends Service {
/**
* Operation id: GreetingService.Greet; REST: PUT /greetingservice/greet
* @param name - who to greet
* @returns the greeting
*/
@Operation()
greet(name: string): string {
return `Hello ${name}`;
}
}
On a model, an instance method operation receives the model loaded from its key:
import { Operation } from "@webda/core";
import { UuidModel } from "@webda/models";
export class Invoice extends UuidModel {
paid!: boolean;
/**
* Operation id: Invoice.Pay
*/
@Operation()
async pay(): Promise<void> {
this.paid = true;
await this.save();
}
}
Transports are services in webda.config.json; add the package and the service:
| Transport | Package | Service |
|---|---|---|
| REST | @webda/core | "RESTService": { "type": "Webda/RESTOperationsTransport" } |
| GraphQL | @webda/graphql | "GraphQLService": { "type": "Webda/GraphQLService" } |
| gRPC | @webda/grpc | "GRPCService": { "type": "Webda/GrpcService" } plus "HttpServerH2c": { "type": "Webda/HttpServer", "port": 50051, "h2c": true } |
| MCP | @webda/mcp | "MCP": { "type": "Webda/McpService" } |
Webda/DomainService must stay configured: it registers the model operations.
Writing a REST route by hand for model CRUD → already exposed by the model operations
One method per transport → one @Operation serves every transport
Removing DomainService → model operations disappear
npm run build regenerates .webda/operations.json: check your operation id is listed. Then npm run debug and call it.
Written for Webda 4.0.0-beta.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub loopingz/webda.io --plugin webda7 skills in this plugin
/webda-configurationUse when changing webda.config.json, application parameters, the parameters of a service or the per-environment deployments of a Webda app/webda-deployUse when deploying a Webda app, adding a deployment environment or building a container image or Lambda package/webda-modelsUse when adding or changing a Webda model, its fields, validation, primary key or relations to other models/webda-servicesUse when adding or changing a Webda service, its parameters, its lifecycle or when wiring it in webda.config.json/webda-storesUse when reading or writing model data, querying models, or choosing or switching the store (memory, file, MongoDB, PostgreSQL) of a Webda app/webda-testingUse when writing, running or fixing tests of a Webda app, its models, services or operationsOther plugins' skills for the same job