Skip to content

Tools

thoth.mcp.tools

Thoth MCP Tools - Tool definitions for the MCP server.

This module contains all MCP tool definitions using FastMCP decorators. Add new tools here to extend the MCP server capabilities.

logger = setup_logger(__name__) module-attribute

mcp = FastMCP('ThothHandbookServer', transport_security=(TransportSecuritySettings(enable_dns_rebinding_protection=False))) module-attribute

get_vector_store() -> VectorStore

Get or initialize the vector store.

list_tools() -> str

List all available MCP tools and their descriptions.

Returns:

Type Description
str

Formatted list of available tools with descriptions

list_topics() -> str

List all unique topics/sections available in the handbook collection.

Returns:

Type Description
str

Formatted list of topics with document counts

search_handbook(query: str, num_results: int = 5) -> str

Search the GitLab Handbook for relevant content.

Parameters:

Name Type Description Default
query str

Natural language search query

required
num_results int

Number of results to return (default: 5, max: 20)

5

Returns:

Type Description
str

Formatted search results with relevant handbook sections