enable_docset_fts
Enable full-text search for a specific docset in Dash documentation browser by using its identifier to improve search functionality and accessibility.
Instructions
Enable full-text search for a specific docset.
Args:
identifier: The docset identifier (from list_installed_docsets)
Returns:
True if FTS was successfully enabled, False otherwise
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | Yes |
Implementation Reference
- src/dash_mcp_server/server.py:360-400 (handler)The main handler function for the 'enable_docset_fts' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function enables full-text search (FTS) for the given docset identifier by making an API call to the Dash documentation server.@mcp.tool() async def enable_docset_fts(ctx: Context, identifier: str) -> bool: """ Enable full-text search for a specific docset. Args: identifier: The docset identifier (from list_installed_docsets) Returns: True if FTS was successfully enabled, False otherwise """ if not identifier.strip(): await ctx.error("Docset identifier cannot be empty") return False try: base_url = await working_api_base_url(ctx) if base_url is None: return False await ctx.debug(f"Enabling FTS for docset: {identifier}") with httpx.Client(timeout=30.0) as client: response = client.get(f"{base_url}/docsets/enable_fts", params={"identifier": identifier}) response.raise_for_status() result = response.json() except httpx.HTTPStatusError as e: if e.response.status_code == 400: await ctx.error(f"Bad request: {e.response.text}") return False elif e.response.status_code == 404: await ctx.error(f"Docset not found: {identifier}") return False await ctx.error(f"HTTP error: {e}") return False except Exception as e: await ctx.error(f"Failed to enable FTS: {e}") return False return True