tavily_fastmcp.profiles¶
Prompt profile registry.
- Purpose:
Publish reusable packaged workflow profiles that pair metadata with large markdown system prompts and MCP-facing discovery metadata.
- Design:
Profiles are defined in code so tests can validate their structure.
Prompt bodies stay in markdown files so they can be edited easily.
Each profile maps cleanly to prompt and profile resource URIs.
The registry includes both operational profiles and documentation-heavy semantic guides for the full Tavily FastMCP surface.
Examples
>>> router = load_profile("router")
>>> router.slug
'router'
>>> "tavily.search" in router.recommended_tools
True
Attributes¶
Classes¶
Static metadata for a packaged prompt profile. |
Functions¶
|
Return summary metadata for all packaged profiles. |
|
Load a full packaged prompt profile. |
|
Render a profile to a human-readable markdown document. |
Module Contents¶
- class tavily_fastmcp.profiles._ProfileData[source]¶
Bases:
TypedDictStatic metadata for a packaged prompt profile.
- tavily_fastmcp.profiles._PROFILE_DATA: dict[str, _ProfileData][source]¶
- tavily_fastmcp.profiles.list_profiles() list[tavily_fastmcp.models.ProfileSummary][source]¶
Return summary metadata for all packaged profiles.
- Returns:
Sorted profile summaries.
- Raises:
FileNotFoundError – If a packaged prompt file is missing.
Examples
>>> any(profile.slug == "router" for profile in list_profiles()) True
- tavily_fastmcp.profiles.load_profile(slug: str) tavily_fastmcp.models.PromptProfile[source]¶
Load a full packaged prompt profile.
- Parameters:
slug – Stable profile slug.
- Returns:
The full prompt profile.
- Raises:
KeyError – If the profile slug is unknown.
FileNotFoundError – If the prompt markdown file is missing.
Examples
>>> load_profile("deep-research").title 'Deep Research'
- tavily_fastmcp.profiles.profile_to_markdown(profile: tavily_fastmcp.models.PromptProfile) str[source]¶
Render a profile to a human-readable markdown document.
- Parameters:
profile – The profile to render.
- Returns:
Markdown that combines metadata with prompt text.
- Raises:
ValueError – If rendering fails.
Examples
>>> md = profile_to_markdown(load_profile("router")) >>> md.startswith("# ") True