Skip to main content
Glama
geoffwhittington

SD Elements MCP Server

update_project

Modify project details such as name, description, and status using the project ID. Integrates with SD Elements MCP Server for streamlined security development lifecycle management.

Instructions

Update an existing project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoUpdated project description
nameNoUpdated project name
project_idYesThe ID of the project to update
statusNoProject status

Implementation Reference

  • Implements the 'update_project' MCP tool handler. Decorated with @mcp.tool() for automatic registration. Validates inputs, especially risk_policy ID, constructs update data, calls api_client.update_project, and returns JSON result or error.
    @mcp.tool()
    async def update_project(ctx: Context, project_id: int, name: Optional[str] = None, description: Optional[str] = None, status: Optional[str] = None, risk_policy: Optional[Union[int, str]] = None) -> str:
        """Update an existing project (name, description, status, or risk_policy). Use when user says 'update', 'change', 'modify', or 'rename'. Do NOT use for 'archive', 'delete', or 'remove' - use delete_project instead.
        
        IMPORTANT: risk_policy must be the numeric ID of the risk policy (e.g., 1, 2, 3), not the name. Use list_risk_policies to find the correct ID.
        
        According to the API documentation (https://docs.sdelements.com/master/api/docs/projects/), 
        risk_policy is an optional field that accepts the ID of the Risk Policy that applies to this project."""
        global api_client
        if api_client is None:
            api_client = init_api_client()
        
        # Validate risk_policy is an integer if provided
        if risk_policy is not None:
            # Handle string-to-int conversion (MCP framework may pass as string)
            if isinstance(risk_policy, str):
                try:
                    risk_policy = int(risk_policy)
                except ValueError:
                    return json.dumps({
                        "error": f"risk_policy must be an integer ID, got string that cannot be converted: {risk_policy}",
                        "suggestion": "Use list_risk_policies to find the correct risk policy ID (numeric value)"
                    }, indent=2)
            elif not isinstance(risk_policy, int):
                return json.dumps({
                    "error": f"risk_policy must be an integer ID, got {type(risk_policy).__name__}: {risk_policy}",
                    "suggestion": "Use list_risk_policies to find the correct risk policy ID (numeric value)"
                }, indent=2)
        
        data = {}
        if name is not None:
            data["name"] = name
        if description is not None:
            data["description"] = description
        if status is not None:
            data["status"] = status
        if risk_policy is not None:
            data["risk_policy"] = risk_policy
        
        if not data:
            return json.dumps({"error": "No update data provided. Specify at least one field to update (name, description, status, or risk_policy)."}, indent=2)
        
        try:
            result = api_client.update_project(project_id, data)
            return json.dumps(result, indent=2)
        except Exception as e:
            error_msg = str(e)
            # Check if it's a risk_policy related error
            if "risk_policy" in error_msg.lower() or "risk policy" in error_msg.lower():
                return json.dumps({
                    "error": f"Failed to update risk_policy: {error_msg}",
                    "suggestion": "Verify the risk_policy ID exists using list_risk_policies. Risk policy must be a valid numeric ID."
                }, indent=2)
            return json.dumps({"error": f"Failed to update project: {error_msg}"}, indent=2)
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 this is an update operation but doesn't mention whether it requires specific permissions, what happens to unspecified fields, if changes are reversible, or any rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 this is a mutation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions or side effects, nor does it explain what the tool returns, leaving significant gaps for agent understanding.

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 input schema has 100% description coverage, clearly documenting all 4 parameters. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't explain parameter interactions or constraints), so it meets the baseline of 3 for high schema coverage.

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

Purpose3/5

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

The description 'Update an existing project' clearly states the action (update) and resource (project), but it's vague about what aspects can be updated and doesn't distinguish this tool from sibling tools like update_application or update_countermeasure. It provides basic purpose but lacks specificity.

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 an existing project ID), exclusions, or compare it to related tools like create_project or delete_project, leaving the agent with no usage context.

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

Related 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/geoffwhittington/sde-mcp'

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