Skip to main content
Glama
gemini2026

Documentation Search MCP Server

by gemini2026

snyk_monitor_project

Set up continuous security monitoring for a project directory to detect vulnerabilities and maintain protection over time.

Instructions

Set up continuous monitoring for a project with Snyk.

Args:
    project_path: Path to the project directory

Returns:
    Status of monitoring setup and project details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNo.

Implementation Reference

  • Main handler function for the 'snyk_monitor_project' MCP tool. Registers the tool with @mcp.tool(), handles input validation via signature, tests Snyk connection, and delegates to SnykIntegration.monitor_project for core logic.
    async def snyk_monitor_project(project_path: str = "."):
        """
        Set up continuous monitoring for a project with Snyk.
    
        Args:
            project_path: Path to the project directory
    
        Returns:
            Status of monitoring setup and project details
        """
        from .snyk_integration import snyk_integration
    
        try:
            # Test connection and get organization info
            connection_test = await snyk_integration.test_connection()
            if connection_test["status"] != "connected":
                return {
                    "error": "Snyk integration not configured",
                    "details": connection_test.get("error", "Unknown error"),
                    "setup_required": [
                        "Set SNYK_API_KEY environment variable",
                        "Set SNYK_ORG_ID environment variable",
                        "Ensure you have organization admin privileges",
                    ],
                }
    
            # Set up monitoring
            monitor_result = await snyk_integration.monitor_project(project_path)
    
            if "error" in monitor_result:
                return monitor_result
    
            return {
                "status": "success",
                "monitoring_enabled": True,
                "project_details": monitor_result,
                "organization": connection_test.get("organizations", []),
                "next_steps": [
                    "๐Ÿ”” Configure alert preferences in Snyk dashboard",
                    "๐Ÿ“Š Review security reports regularly",
                    "๐Ÿ”„ Enable automatic PRs for security updates",
                    "๐Ÿ“ˆ Set up integration with CI/CD pipeline",
                ],
                "dashboard_url": "https://app.snyk.io/org/your-org/projects",
            }
    
        except Exception as e:
            return {
                "error": f"Monitoring setup failed: {str(e)}",
                "project_path": project_path,
            }
  • Core helper method in SnykIntegration class that implements project monitoring by parsing dependencies, generating manifest, and calling Snyk REST API to import the project for continuous monitoring.
    async def monitor_project(self, project_path: str) -> Dict[str, Any]:
        """Set up continuous monitoring for a project"""
    
        # Find project dependencies
        dep_result = find_and_parse_dependencies(project_path)
        if not dep_result:
            return {"error": "No supported dependency files found"}
    
        filename, ecosystem, dependencies = dep_result
    
        try:
            async with httpx.AsyncClient(timeout=self.timeout) as client:
                # Import project for monitoring
                import_payload = {
                    "target": {
                        "files": [
                            {
                                "path": filename,
                                "contents": self._generate_manifest_content(
                                    dependencies, ecosystem
                                ),
                            }
                        ]
                    }
                }
    
                if not self.org_id:
                    return {
                        "error": "SNYK_ORG_ID environment variable is required for monitoring"
                    }
    
                response = await client.post(
                    f"{self.rest_api_url}/orgs/{self.org_id}/projects",
                    headers=self._get_headers(),
                    json=import_payload,
                )
    
                if response.status_code == 201:
                    project_data = response.json()
                    return {
                        "status": "monitoring_enabled",
                        "project_id": project_data.get("data", {}).get("id"),
                        "project_name": os.path.basename(project_path),
                        "dependencies_count": len(dependencies),
                    }
                else:
                    return {
                        "error": f"Failed to enable monitoring: {response.status_code}",
                        "details": response.text,
                    }
    
        except Exception as e:
            return {"error": f"Monitoring setup failed: {str(e)}"}
  • MCP tool registration decorator @mcp.tool() that registers the snyk_monitor_project function as an MCP tool.
    @mcp.tool()
    async def snyk_monitor_project(project_path: str = "."):
  • Tool schema/arguments documentation defining input (project_path: str) and expected output format.
    """
    Set up continuous monitoring for a project with Snyk.
    
    Args:
        project_path: Path to the project directory
    
    Returns:
        Status of monitoring setup and project details
    """
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Set up continuous monitoring') but lacks details on what this entailsโ€”such as whether it modifies project files, requires authentication, has rate limits, or what happens on failure. The return statement hints at output but doesn't clarify format or potential errors, leaving significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose, followed by parameter and return details in a clear format. It avoids redundancy and uses minimal sentences, though the return statement could be more specific. Overall, it's efficient but not perfectly concise, earning a high score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation for monitoring setup), lack of annotations, no output schema, and low schema description coverage, the description is incomplete. It misses critical details like behavioral traits, error handling, and output specifics, making it inadequate for safe and effective use by an agent in this context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an 'Args' section that documents the single parameter 'project_path' with a brief explanation ('Path to the project directory'), adding meaning beyond the input schema (which has 0% description coverage). However, it doesn't elaborate on path format (e.g., absolute vs. relative), default behavior, or constraints, so it only partially compensates for the schema gap, aligning with the baseline for moderate coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Set up continuous monitoring for a project with Snyk,' which includes a specific verb ('Set up') and resource ('project with Snyk'). It distinguishes from siblings like 'snyk_scan_project' (one-time scan) by focusing on ongoing monitoring. However, it doesn't explicitly contrast with all siblings, such as 'snyk_license_check' or 'snyk_scan_library,' which is why it's a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing Snyk configured), exclusions (e.g., not for one-time scans), or refer to sibling tools like 'snyk_scan_project' for different use cases. This lack of contextual direction leaves the agent to infer usage, resulting in a minimal score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gemini2026/documentation-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server