mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 06:24:18 +02:00
Fix typo in decorating-methods.mdx (#1344)
This commit is contained in:
parent
ec52e74b48
commit
85d04a2880
1 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ description: Properly use instance methods, class methods, and static methods wi
|
|||
icon: at
|
||||
---
|
||||
|
||||
FastMCP's decorator system is designed to work with functions, but you may see unexpected behavior if you try to decorate an instance or class method. This guide explains the correct approach for using methods with all FastMCP decorators (`@tool`, `@resource`, and `.prompt`).
|
||||
FastMCP's decorator system is designed to work with functions, but you may see unexpected behavior if you try to decorate an instance or class method. This guide explains the correct approach for using methods with all FastMCP decorators (`@tool`, `@resource`, and `@prompt`).
|
||||
|
||||
## Why Are Methods Hard?
|
||||
|
||||
|
|
@ -222,4 +222,4 @@ The current behavior of FastMCP decorators with methods is:
|
|||
For class and instance methods, you should register them after creating the instance or class to ensure proper method binding. This ensures that the methods are properly bound before being registered.
|
||||
|
||||
|
||||
Understanding these patterns allows you to effectively organize your components into classes while maintaining proper method binding, giving you the benefits of object-oriented design without sacrificing the simplicity of FastMCP's decorator system.
|
||||
Understanding these patterns allows you to effectively organize your components into classes while maintaining proper method binding, giving you the benefits of object-oriented design without sacrificing the simplicity of FastMCP's decorator system.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue