Skip to main content
Glama

send_invite_from_template

Create documents from templates and send signing invites to recipients in one step using the SignNow MCP Server.

Instructions

Create document/group from template and send invite immediately. This tool is ONLY for templates and template groups. If you have document or document_group, use the alternative tool: send_invite

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesID of the template or template group
ordersYesList of orders with recipients for the invite (can be a list or JSON string)
entity_typeNoType of entity: 'template' or 'template_group' (optional). If you're passing it, make sure you know what type you have. If it's not found, try using a different type.
nameNoOptional name for the new document or document group

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
invite_idYesID of the created invite
invite_entityYesType of invite entity: 'document' or 'document_group'
created_entity_idYesID of the created document or document group
created_entity_nameYesName of the created entity
created_entity_typeYesType of created entity: 'document' or 'document_group'

Implementation Reference

  • MCP tool registration and handler function for send_invite_from_template. Normalizes orders, gets auth token, and delegates to core implementation.
    @mcp.tool(
        name="send_invite_from_template",
        description=(
            "Create document/group from template and send invite immediately. "
            "This tool is ONLY for templates and template groups. "
            "If you have document or document_group, use the alternative tool: send_invite"
        ),
        tags=["template", "template_group", "document", "document_group", "send_invite", "workflow"],
    )
    async def send_invite_from_template(
        ctx: Context,
        entity_id: Annotated[str, Field(description="ID of the template or template group")],
        orders: Annotated[
            list[InviteOrder] | str,
            Field(
                description="List of orders with recipients for the invite (can be a list or JSON string)",
                examples=[
                    [{"order": 1, "recipients": [{"email": "user@example.com", "role": "Signer 1", "action": "sign"}]}],
                    '[{"order": 1, "recipients": [{"email": "user@example.com", "role": "Signer 1", "action": "sign"}]}]',
                ],
            ),
        ],
        entity_type: Annotated[
            Literal["template", "template_group"] | None,
            Field(description="Type of entity: 'template' or 'template_group' (optional). If you're passing it, make sure you know what type you have. If it's not found, try using a different type."),
        ] = None,
        name: Annotated[str | None, Field(description="Optional name for the new document or document group")] = None,
    ) -> SendInviteFromTemplateResponse:
        """Create document or document group from template and send invite immediately.
    
        This tool is ONLY for templates and template groups.
        If you have document or document_group, use the alternative tool: send_invite
    
        This tool combines two operations:
        1. Creates a document/group from template using create_from_template
        2. Sends an invite to the created entity using send_invite
    
        Args:
            entity_id: ID of the template or template group
            orders: List of orders with recipients for the invite (can be a list or JSON string)
            entity_type: Type of entity: 'template' or 'template_group' (optional). If you're passing it, make sure you know what type you have. If it's not found, try using a different type.
            name: Optional name for the new document or document group
    
        Returns:
            SendInviteFromTemplateResponse with created entity info and invite details
        """
        token, client = _get_token_and_client(token_provider)
    
        # Normalize orders parameter (handle JSON string input)
        normalized_orders = _normalize_orders(orders, InviteOrder)
    
        # Initialize client and use the imported function from send_invite module
        return await _send_invite_from_template(entity_id, entity_type, name, normalized_orders, token, client, ctx)
  • Core handler logic: creates document/group from template, sends invite, reports progress using MCP context.
    async def _send_invite_from_template(
        entity_id: str, entity_type: Literal["template", "template_group"] | None, name: str | None, orders: list[InviteOrder], token: str, client: SignNowAPIClient, ctx: Context
    ) -> SendInviteFromTemplateResponse:
        """Private function to create document/group from template and send invite immediately.
    
        Args:
            entity_id: ID of the template or template group
            entity_type: Type of entity: 'template' or 'template_group' (optional). If you're passing it, make sure you know what type you have. If it's not found, try using a different type.
            name: Optional name for the new document or document group
            orders: List of orders with recipients for the invite
            token: Access token for SignNow API
            client: SignNow API client instance
            ctx: FastMCP context for progress reporting
    
        Returns:
            SendInviteFromTemplateResponse with created entity info and invite details
        """
        # Report initial progress
        await ctx.report_progress(progress=1, total=3)
    
        # Import and use the create from template function directly
        from .create_from_template import _create_from_template
    
        # Use the imported function to create from template
        created_entity = _create_from_template(entity_id, entity_type, name, token, client)
    
        # Report progress after template creation
        await ctx.report_progress(progress=2, total=3)
    
        # Then send invite
        invite_response = _send_invite(created_entity.entity_id, created_entity.entity_type or "document", orders, token, client)
    
        # Report final progress after invite sending
        await ctx.report_progress(progress=3, total=3)
    
        return SendInviteFromTemplateResponse(
            created_entity_id=created_entity.entity_id,
            created_entity_type=created_entity.entity_type,
            created_entity_name=created_entity.name,
            invite_id=invite_response.invite_id,
            invite_entity=invite_response.invite_entity,
        )
  • Input schema (SendInviteFromTemplateRequest) defining parameters for the tool.
    class SendInviteFromTemplateRequest(BaseModel):
        """Request model for creating document/group from template and sending invite immediately."""
    
        entity_id: str = Field(..., description="ID of the template or template group")
        entity_type: str | None = Field(None, description="Type of entity: 'template' or 'template_group' (optional)")
        name: str | None = Field(None, description="Optional name for the new document or document group")
        folder_id: str | None = Field(None, description="Optional ID of the folder to store the document group")
        orders: list[InviteOrder] = Field(default=[], description="List of orders with recipients for the invite")
  • Output schema (SendInviteFromTemplateResponse) defining the tool's return type.
    class SendInviteFromTemplateResponse(BaseModel):
        """Response model for creating document/group from template and sending invite immediately."""
    
        created_entity_id: str = Field(..., description="ID of the created document or document group")
        created_entity_type: str = Field(..., description="Type of created entity: 'document' or 'document_group'")
        created_entity_name: str = Field(..., description="Name of the created entity")
        invite_id: str = Field(..., description="ID of the created invite")
        invite_entity: str = Field(..., description="Type of invite entity: 'document' or 'document_group'")
Behavior3/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 tool creates documents/groups and sends invites immediately, which implies mutation and side effects. However, it doesn't disclose important behavioral aspects like required permissions, whether the operation is reversible, rate limits, or what happens on failure. The description adds basic context but lacks depth 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.

Conciseness5/5

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

The description is extremely concise with just two sentences that efficiently convey the core purpose and key usage constraint. Every word earns its place, and the most critical information (what it does and when to use it) is front-loaded in the first sentence.

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

Completeness4/5

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

Given the tool's complexity (mutation with 4 parameters, nested objects in orders) and the presence of an output schema, the description covers the essential purpose and usage constraints well. However, for a mutation tool with no annotations, it could benefit from more behavioral context about permissions, side effects, or error handling. The output schema reduces the need to explain return values.

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 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions templates/template groups which relates to entity_type, but this is already covered in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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 tool's purpose with specific verbs ('Create document/group from template' and 'send invite immediately') and resource ('templates and template groups'). It explicitly distinguishes from the sibling tool 'send_invite' by stating this is ONLY for templates, providing clear differentiation.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('ONLY for templates and template groups') and when to use an alternative ('If you have document or document_group, use the alternative tool: send_invite'). This gives clear context for tool selection versus sibling 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

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

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