Skip to main content
Glama
geoffwhittington

SD Elements MCP Server

create_project

Initiate a new project within SD Elements by specifying project details such as name, description, application ID, and phase ID using the SD Elements MCP Server API integration.

Instructions

Create a new project in SD Elements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYesID of the application this project belongs to
descriptionNoProject description
nameYesProject name
phase_idNoID of the project phase

Implementation Reference

  • The core handler function for the 'create_project' MCP tool. Decorated with @mcp.tool() for automatic registration. Handles input validation via elicitation for missing name and profile_id, detects profile automatically if possible, constructs API payload, calls the SD Elements API to create the project, and returns JSON response.
    @mcp.tool()
    async def create_project(
        ctx: Context,
        application_id: int,
        name: Optional[str] = None,
        description: Optional[str] = None,
        phase_id: Optional[int] = None,
        profile_id: Optional[str] = None,
    ) -> str:
        """Create a new project in SD Elements. If name is not specified, prompts user to provide it. If profile is not specified, attempts to detect it from project name/description (e.g., 'mobile project' → Mobile profile). If detection fails, prompts user to select from available profiles."""
        global api_client
        if api_client is None:
            api_client = init_api_client()
        
        # Elicitation for name if not provided
        if not name:
            try:
                name_result = await asyncio.wait_for(
                    ctx.elicit(
                        "What is the name of the project you want to create?",
                        response_type=str
                    ),
                    timeout=ELICITATION_TIMEOUT
                )
                if name_result.action != "accept":
                    return json.dumps({"error": "Project creation cancelled: project name is required"})
                name = name_result.data
            except asyncio.TimeoutError:
                return json.dumps({"error": "Elicitation timeout: project name is required. Please provide the 'name' parameter."})
        
        # Elicitation for profile_id if not provided
        if not profile_id:
            profiles_response = api_client.list_profiles({"page_size": 1000})
            profiles = profiles_response.get("results", [])
            
            if not profiles:
                return json.dumps({"error": "No profiles available. Cannot create project without a profile."})
            
            # Try to detect profile from project name/description
            detected_profile_id = detect_profile_from_context(name, description or "", profiles)
            
            if detected_profile_id:
                # Profile detected automatically - use it
                profile_id = detected_profile_id
            else:
                # No profile detected - prompt user to select from available profiles
                profile_options = []
                profile_id_map = {}
                default_profile_id = None
                
                for profile in profiles:
                    profile_name_val = profile.get("name", "Unnamed Profile")
                    profile_id_val = profile.get("id")
                    profile_options.append(profile_name_val)
                    profile_id_map[profile_name_val] = profile_id_val
                    
                    # Track default profile to highlight it in the prompt
                    if profile.get("default", False):
                        default_profile_id = profile_id_val
                
                # Always prompt user to select a profile when detection fails
                prompt_message = "Select a profile:"
                if default_profile_id:
                    # Find default profile name for the prompt
                    default_profile_name = next(
                        (name for name, pid in profile_id_map.items() if pid == default_profile_id),
                        None
                    )
                    if default_profile_name:
                        prompt_message = f"Select a profile (default: {default_profile_name}):"
                
                try:
                    profile_result = await asyncio.wait_for(
                        ctx.elicit(prompt_message, response_type=profile_options),
                        timeout=ELICITATION_TIMEOUT
                    )
                    if profile_result.action != "accept":
                        return json.dumps({"error": "Project creation cancelled: profile selection is required"})
                    profile_id = profile_id_map.get(profile_result.data)
                    if not profile_id:
                        return json.dumps({"error": f"Could not find profile ID for selection: {profile_result.data}"})
                except asyncio.TimeoutError:
                    return json.dumps({"error": "Elicitation timeout: profile selection is required. Please provide the 'profile_id' parameter."})
        
        # Ensure profile_id is set - API requires it
        if not profile_id:
            return json.dumps({"error": "Profile is required but could not be determined. Please specify a profile_id."})
        
        data = {"name": name, "application": application_id}
        if description:
            data["description"] = description
        if phase_id:
            data["phase_id"] = phase_id
        # Profile is required, so always include it
        data["profile"] = profile_id
        
        result = api_client.create_project(data)
        return json.dumps(result, indent=2)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Create' implies a write operation, it doesn't address important behavioral aspects like required permissions, whether the operation is idempotent, what happens on duplicate names, or what the response contains. For a mutation tool with zero annotation coverage, this leaves significant gaps.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place in conveying the core functionality.

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?

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what a 'project' represents in SD Elements, what happens after creation, or what the tool returns. Given the complexity of creating a new entity in a system with multiple related tools, more context is needed for an agent to use this effectively.

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?

Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, but the schema provides complete coverage, establishing a baseline of 3 for adequate parameter documentation.

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 action ('Create a new project') and the target resource ('in SD Elements'), which provides a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'create_application' or explain what distinguishes a project from other entities in the system.

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 like 'create_application' or 'update_project'. It doesn't mention prerequisites, context for project creation, or any exclusions that would help an agent choose appropriately among the available creation tools.

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