Decorators API Reference
Python decorators from nitrostack. Do not use TypeScript @Tool / @Module / @Injectable.
MCP primitives
@tool
Python
@tool(name, description, input_schema, title=..., output_schema=..., annotations=..., task_support=..., visibility=..., examples=..., invocation=..., metadata=...)
input_schema is a Pydantic BaseModel. Related: @initial_tool, @widget, ToolAnnotations, ToolExamples, ToolInvocation.
@resource
Python
@resource(uri, name, description, mime_type=..., annotations=...)
@prompt
Python
@prompt(name, description, arguments=[PromptArgument(...)])
Modules and DI
Python
@module(name=..., controllers=..., providers=..., imports=..., exports=...)
@injectable(deps=[ServiceA, ServiceB])
@mcp_app(module=AppModule, server=ServerConfig(...))
@health_check(name="system")
Pipeline
Python
@use_guards(...)
@use_middleware(...)
@use_interceptors(...)
@use_pipes(...)
@use_filters(...)
Extra
Python
@cache(ttl=60)
@rate_limit(max=100, window=60)
@on_event("name")
@widget("route") # or WidgetOptions(...)
See Tools and Server Concepts.