Skip to main content
Glama
waldur

Waldur MCP Server

Official
by waldur

create_invitation

Invite users to projects or organizations by email, assign roles, and include custom messages for collaboration setup.

Instructions

Invite users to project or organization by email

Args: scope_type: Whether to invite users to organization or project scope_name: Name of the organization or project to invite users to role: Role to assign to invited users emails: List of email addresses to invite extra_invitation_text: Custom message to include in the invitation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scope_typeYes
scope_nameYes
roleYes
emailsYes
extra_invitation_textNo

Implementation Reference

  • Handler function for the 'create_invitation' tool, decorated with @mcp.tool() for registration. It resolves roles, scopes (customer/project), and creates invitations using the Waldur API client.
    @mcp.tool()
    async def create_invitation(
        scope_type: Literal["customer", "project"],
        scope_name: str,
        role: str,
        emails: list[str],
        extra_invitation_text: str = "",
    ) -> list[Invitation]:
        """Invite users to project or organization by email
    
        Args:
            scope_type: Whether to invite users to organization or project
            scope_name: Name of the organization or project to invite users to
            role: Role to assign to invited users
            emails: List of email addresses to invite
            extra_invitation_text: Custom message to include in the invitation
        """
    
        matching_roles = await roles_list.asyncio(client=client, description=role)
        if not matching_roles:
            raise ValueError(f"Role '{role}' not found")
        role_uuid = matching_roles[0]["uuid"]
    
        if scope_type == "customer":
            matching_customers = await customers_list.asyncio(
                client=client, name=scope_name
            )
            if not matching_customers:
                raise ValueError(f"Customer '{scope_name}' not found")
            scope_url = matching_customers[0]["url"]
        elif scope_type == "project":
            matching_projects = await projects_list.asyncio(client=client, name=scope_name)
            if not matching_projects:
                raise ValueError(f"Project '{scope_name}' not found")
            scope_url = matching_projects[0]["url"]
    
        if not scope_url:
            raise ValueError(f"Invalid scope type: {scope_type}")
    
        results = []
        for email in emails:
            result = await user_invitations_create.asyncio(
                client=client,
                body=InvitationRequest(
                    scope=scope_url,
                    role=role_uuid,
                    email=email,
                    extra_invitation_text=extra_invitation_text,
                ),
            )
            results.append(result)
    
        return results
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 it implies a write operation ('Invite'), it doesn't address permissions needed, whether invitations are revocable, rate limits, or what happens if emails are invalid. The description provides minimal behavioral context beyond the basic action.

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 efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence serves a purpose, though the parameter explanations could be slightly more concise. The front-loaded purpose statement is effective.

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

Completeness3/5

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

For a mutation tool with 5 parameters, no annotations, and no output schema, the description provides adequate functional coverage but lacks important contextual details about permissions, error conditions, and behavioral expectations. It explains what the tool does but not how it behaves in edge cases.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by explaining all 5 parameters in the Args section, clarifying what each represents (e.g., 'scope_type: Whether to invite users to organization or project'). It adds meaningful context beyond the bare schema, though it doesn't specify enum values for scope_type.

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

Purpose5/5

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

The description clearly states the specific action ('Invite users') and target resources ('to project or organization by email'), distinguishing it from sibling tools that focus on listing or querying operations. It provides a verb+resource combination that is precise and unambiguous.

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, prerequisites, or exclusions. It lacks context about when invitations are appropriate or how this differs from other user management tools, offering only basic functional information.

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/waldur/waldur-mcp-server'

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