Skip to main content
Glama

invite_user

Add new users to Devici's threat modeling platform by providing their email, name, and assigned role for access management.

Instructions

Invite a new user to Devici

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes
first_nameYes
last_nameYes
roleYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler and registration for 'invite_user'. Decorated with @mcp.tool(), executes by calling the API client method.
    @mcp.tool()
    async def invite_user(email: str, first_name: str, last_name: str, role: str) -> str:
        """Invite a new user to Devici"""
        async with create_client_from_env() as client:
            result = await client.invite_user(email, first_name, last_name, role)
            return str(result)
  • API client helper method that performs the actual HTTP POST request to invite a user via the Devici API.
    async def invite_user(self, email: str, first_name: str, last_name: str, role: str) -> Dict[str, Any]:
        """Invite specific user."""
        user_data = {
            "email": email,
            "firstName": first_name,
            "lastName": last_name,
            "role": role
        }
        return await self._make_request("POST", "/users/invite", json_data=user_data)
  • Factory function to create the authenticated API client from environment variables, used by the handler.
    def create_client_from_env() -> DeviciAPIClient:
        """Create API client from environment variables."""
        config = DeviciConfig(
            api_base_url=os.getenv("DEVICI_API_BASE_URL", "https://api.devici.com/api/v1"),
            client_id=os.getenv("DEVICI_CLIENT_ID", ""),
            client_secret=os.getenv("DEVICI_CLIENT_SECRET", ""),
            debug=os.getenv("DEBUG", "false").lower() == "true"
        )
        
        if not config.client_id or not config.client_secret:
            raise ValueError("DEVICI_CLIENT_ID and DEVICI_CLIENT_SECRET must be set")
            
        return DeviciAPIClient(config) 
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. It states the action is 'invite' but doesn't clarify whether this sends an email invitation, requires admin permissions, has rate limits, or what happens if the user already exists. This leaves critical behavioral aspects unspecified for a mutation operation.

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, 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.

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 no annotations, 4 parameters, and an output schema (which reduces need to describe returns), the description is minimally adequate. It states what the tool does but lacks crucial context about permissions, side effects, and error conditions that would help an agent use it correctly.

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 adds no parameter information beyond what's in the schema (which has 0% description coverage). While the schema clearly defines four required parameters (email, first_name, last_name, role), the description doesn't explain their purpose, constraints, or relationships. The baseline is 3 since the schema provides structure, but the description fails to compensate for the coverage gap.

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 ('Invite') and the target ('a new user to Devici'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential alternatives like 'create_user' or specify what 'invite' entails versus direct creation.

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. Given sibling tools include 'create_collection' and 'get_user', there's no indication of whether this is for initial user onboarding versus other user management scenarios, leaving the agent to guess based on 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

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/devici-mcp'

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