Skip to main content

Basic Usage

Signature

Configuration Options

Required Properties

Optional Properties

Output Types

Authorization

Annotations

Examples

UI Configuration

Function-Based Alternative

For simpler tools, use the tool() function:

Context Methods

The ToolContext base class provides:

Dependency Injection

Notifications

Elicitation (Interactive Input)

Platform Detection

Authentication

HTTP Requests

Error Handling

Type Inference

FrontMCP provides helper types for extracting input/output types:

Full Example

ToolContext

Context class details

ToolRegistry

Tool registry API

Tool Errors

Tool-related errors

@Resource

Define resources