Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115---title: skillssidebarTitle: skills---
# `fastmcp.utilities.skills`
Client utilities for discovering and downloading skills from MCP servers.
## Functions
### `list_skills` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L43" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythonlist_skills(client: Client) -> list[SkillSummary]```
List all available skills from an MCP server.
Discovers skills by finding resources with URIs matching the`skill://{name}/SKILL.md` pattern.
**Args:**- `client`: Connected FastMCP client
**Returns:**- List of SkillSummary objects with name, description, and URI
### `get_skill_manifest` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L87" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythonget_skill_manifest(client: Client, skill_name: str) -> SkillManifest```
Get the manifest for a specific skill.
**Args:**- `client`: Connected FastMCP client- `skill_name`: Name of the skill
**Returns:**- SkillManifest with file listing
**Raises:**- `ValueError`: If manifest cannot be read or parsed
### `download_skill` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L127" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythondownload_skill(client: Client, skill_name: str, target_dir: str | Path) -> Path```
Download a skill and all its files to a local directory.
Creates a subdirectory named after the skill containing all files.
**Args:**- `client`: Connected FastMCP client- `skill_name`: Name of the skill to download- `target_dir`: Directory where skill folder will be created- `overwrite`: If True, overwrite existing skill directory. If False(default), raise FileExistsError if directory exists.
**Returns:**- Path to the downloaded skill directory
**Raises:**- `ValueError`: If skill cannot be found or downloaded- `FileExistsError`: If skill directory exists and overwrite=False
### `sync_skills` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L218" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
```pythonsync_skills(client: Client, target_dir: str | Path) -> list[Path]```
Download all available skills from a server.
**Args:**- `client`: Connected FastMCP client- `target_dir`: Directory where skill folders will be created- `overwrite`: If True, overwrite existing files
**Returns:**- List of paths to downloaded skill directories
## Classes
### `SkillSummary` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L18" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
Summary information about a skill available on a server.
### `SkillFile` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L27" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
Information about a file within a skill.
### `SkillManifest` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/utilities/skills.py#L36" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
Full manifest of a skill including all files.