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

_ProfileData

Static metadata for a packaged prompt profile.

Functions

list_profiles(→ list[tavily_fastmcp.models.ProfileSummary])

Return summary metadata for all packaged profiles.

load_profile(→ tavily_fastmcp.models.PromptProfile)

Load a full packaged prompt profile.

profile_to_markdown(→ str)

Render a profile to a human-readable markdown document.

Module Contents

tavily_fastmcp.profiles.RESOURCE_PREFIX = 'resource://tavily-fastmcp'[source]
class tavily_fastmcp.profiles._ProfileData[source]

Bases: TypedDict

Static metadata for a packaged prompt profile.

title: str[source]
summary: str[source]
use_when: list[str][source]
avoid_when: list[str][source]
recommended_tools: list[str][source]
tags: list[str][source]
meta: dict[str, Any][source]
prompt_name: str[source]
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