get_scout_setup_instructions
Retrieve official setup instructions to instrument Scout APM monitoring in supported frameworks like Django, FastAPI, and Celery for performance tracking.
Instructions
Get step-by-step instructions to instrument Scout APM in a framework.
Always use this tool first when asked to setup/instrument/configure
Scout APM in an application. This provides official, tested configuration
instructions that should be followed exactly.
Supported frameworks:
- Web: bottle, dash, django, falcon, fastapi, flask, hug, rails, starlette
- Background Jobs: celery, dramatiq, huey, rq
- Database: sqlalchemy
Args:
framework: The framework or library name (e.g., "fastapi", "django", "celery")
Returns:
Complete setup instructions including installation, configuration, and examples.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| framework | Yes |
Implementation Reference
- scout_mcp/server.py:100-119 (handler)The MCP tool handler for 'get_scout_setup_instructions', which loads framework-specific setup instructions via the helper function. Includes decorator for registration and type hints for schema.@mcp.tool(name="get_scout_setup_instructions") def get_scout_setup_instructions(framework: str) -> str: """Get step-by-step instructions to instrument Scout APM in a framework. Always use this tool first when asked to setup/instrument/configure Scout APM in an application. This provides official, tested configuration instructions that should be followed exactly. Supported frameworks: - Web: bottle, dash, django, falcon, fastapi, flask, hug, rails, starlette - Background Jobs: celery, dramatiq, huey, rq - Database: sqlalchemy Args: framework: The framework or library name (e.g., "fastapi", "django", "celery") Returns: Complete setup instructions including installation, configuration, and examples. """ return _load_setup_instructions(framework)
- scout_mcp/server.py:41-64 (helper)Internal helper function that loads the setup instructions from a markdown file in config_resources directory or returns available frameworks list if not found.def _load_setup_instructions(framework: str) -> str: """Internal helper to load setup instructions for a framework. Args: framework: The framework or library name (e.g., "fastapi", "django", "celery") Returns: Setup instructions markdown content or error message with available frameworks. """ templates_dir = Path(__file__).parent / "config_resources" template_path = templates_dir / f"{framework.lower()}.md" if template_path.exists(): return template_path.read_text() else: available = [ f.stem for f in templates_dir.iterdir() if f.is_file() and f.suffix == ".md" ] available_list = ", ".join(sorted(available)) return ( f"Configuration not found for: {framework}\n\n" f"Available frameworks: {available_list}" )