File size: 733 Bytes
1814d17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: components
sidebarTitle: components
---

# `fastmcp.utilities.components`

## Classes

### `FastMCPComponent`


Base class for FastMCP tools, prompts, resources, and resource templates.


**Methods:**

#### `key`

```python
key(self) -> str
```

The key of the component. This is used for internal bookkeeping
and may reflect e.g. prefixes or other identifiers. You should not depend on
keys having a certain value, as the same tool loaded from different
hierarchies of servers may have different keys.


#### `with_key`

```python
with_key(self, key: str) -> Self
```

#### `enable`

```python
enable(self) -> None
```

Enable the component.


#### `disable`

```python
disable(self) -> None
```

Disable the component.