Skip to main content

Decorator Categories

Server Decorators

  • @FrontMcp - Bootstrap MCP server
  • @App - Define application modules

Entry Decorators

  • @Tool - Define MCP tools
  • @Resource / @ResourceTemplate - Define resources
  • @Prompt - Define prompt templates
  • @Agent - Define autonomous agents
  • @Skill - Define knowledge packages
  • @Job - Define executable jobs
  • @Workflow - Define multi-step workflows

Extension Decorators

  • @Plugin - Create plugins
  • @Provider - Dependency injection
  • @Adapter - Framework adapters

Hook Decorators

  • @Stage - Define flow stages
  • @Will - Before-stage hooks
  • @Did - After-stage hooks
  • @Around - Wrap-stage hooks

Class-Based vs Function-Based

Most entry decorators support both patterns:

Function-Based (Simpler Definitions)

Type Inference

FrontMCP provides full type inference for inputs and outputs:

Common Patterns

Metadata Properties

All entry decorators share common metadata properties:

Context Access

All context classes provide:

Importing from External Packages

Decorators expose static .esm() and .remote() factories for declaring entries that come from outside the local source tree:
Both factories are available on Tool, Resource, Prompt, Agent, Skill, Job, and App. Pass the resulting handle into your @App or @FrontMcp decorator just like a class-based entry:
See the ESM Dynamic Loading feature for the full lifecycle, and Remote MCP servers for remote semantics.

Next Steps

@FrontMcp

Bootstrap your MCP server

@Tool

Create MCP tools

@Resource

Define resources

@Prompt

Create prompt templates

@Job

Define executable jobs

@Workflow

Define multi-step workflows