Skip to main content
Glama

create_embedded_sending

Generate embedded sending links to manage, edit, or send invites for documents and document groups in SignNow.

Instructions

Create embedded sending for managing, editing, or sending invites for a document or document group. This tool is ONLY for documents and document groups. If you have template or template_group, use the alternative tool: create_embedded_sending_from_template

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesID of the document or document group
entity_typeNoType of entity: 'document' or 'document_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.
redirect_uriNoOptional redirect URI after completion
redirect_targetNoOptional redirect target: 'self' (default), 'blank'
link_expirationNoOptional link expiration in days (14-45)
typeNoType of sending step: 'manage', 'edit', or 'send-invite'manage

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sending_urlYesURL for the embedded sending
sending_entityYesType of sending entity: 'document', 'document_group', or 'invite'

Implementation Reference

  • MCP tool handler for 'create_embedded_sending': decorated function that authenticates, calls helper, returns CreateEmbeddedSendingResponse
        name="create_embedded_sending",
        description=(
            "Create embedded sending for managing, editing, or sending invites for a document or document group. "
            "This tool is ONLY for documents and document groups. "
            "If you have template or template_group, use the alternative tool: create_embedded_sending_from_template"
        ),
        tags=["edit", "document", "document_group", "send_invite", "embedded", "workflow"],
    )
    def create_embedded_sending(
        ctx: Context,
        entity_id: Annotated[str, Field(description="ID of the document or document group")],
        entity_type: Annotated[
            Literal["document", "document_group"] | None,
            Field(description="Type of entity: 'document' or 'document_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,
        redirect_uri: Annotated[str | None, Field(description="Optional redirect URI after completion")] = None,
        redirect_target: Annotated[str | None, Field(description="Optional redirect target: 'self' (default), 'blank'")] = None,
        link_expiration: Annotated[int | None, Field(ge=14, le=45, description="Optional link expiration in days (14-45)")] = None,
        type: Annotated[Literal["manage", "edit", "send-invite"] | None, Field(description="Type of sending step: 'manage', 'edit', or 'send-invite'")] = "manage",
    ) -> CreateEmbeddedSendingResponse:
        """Create embedded sending for managing, editing, or sending invites for a document or document group.
    
        This tool is ONLY for documents and document groups.
        If you have template or template_group, use the alternative tool: create_embedded_sending_from_template
    
        Args:
            entity_id: ID of the document or document group
            entity_type: Type of entity: 'document' or 'document_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.
            redirect_uri: Optional redirect URI for the sending link
            redirect_target: Optional redirect target for the sending link
            link_expiration: Optional number of days for the sending link to expire (14-45)
            type: Specifies the sending step: 'manage' (default), 'edit', 'send-invite'
    
        Returns:
            CreateEmbeddedSendingResponse with entity type, and URL
        """
        token, client = _get_token_and_client(token_provider)
    
        return _create_embedded_sending(entity_id, entity_type, redirect_uri, redirect_target, link_expiration, type, token, client)
  • Core helper implementing the logic: auto-detects entity type (document or document_group), delegates to type-specific helpers, constructs response
    def _create_embedded_sending(
        entity_id: str,
        entity_type: Literal["document", "document_group"] | None,
        redirect_uri: str | None,
        redirect_target: str | None,
        link_expiration: int | None,
        sending_type: str | None,
        token: str,
        client: SignNowAPIClient,
    ) -> CreateEmbeddedSendingResponse:
        """Private function to create embedded sending for managing, editing, or sending invites for a document or document group.
    
        Args:
            entity_id: ID of the document or document group
            entity_type: Type of entity: 'document' or 'document_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.
            redirect_uri: Optional redirect URI for the sending link
            redirect_target: Optional redirect target for the sending link
            link_expiration: Optional number of days for the sending link to expire (14-45)
            sending_type: Specifies the sending step: 'manage' (default), 'edit', 'send-invite'
            token: Access token for SignNow API
            client: SignNow API client instance
    
        Returns:
            CreateEmbeddedSendingResponse with entity type and URL
        """
        # Determine entity type if not provided
        document_group = None  # Store document group if found during auto-detection
    
        if not entity_type:
            # Try to determine entity type by attempting to get document group first (higher priority)
            try:
                document_group = client.get_document_group(token, entity_id)
                entity_type = "document_group"
            except Exception:
                # If document group not found, try document
                try:
                    client.get_document(token, entity_id)
                    entity_type = "document"
                except Exception:
                    raise ValueError(f"Entity with ID {entity_id} not found as either document group or document") from None
    
        if entity_type == "document_group":
            # Create document group embedded sending
            # Get the document group if we don't have it yet
            if not document_group:
                document_group = client.get_document_group(token, entity_id)
    
            return _create_document_group_embedded_sending(client, token, entity_id, redirect_uri, redirect_target, link_expiration, sending_type)
        else:
            # Create document embedded sending
            return _create_document_embedded_sending(client, token, entity_id, redirect_uri, redirect_target, link_expiration, sending_type)
  • Document-specific helper calling SignNow client.create_document_embedded_sending
    def _create_document_embedded_sending(
        client: SignNowAPIClient, token: str, entity_id: str, redirect_uri: str | None, redirect_target: str | None, link_expiration: int | None, sending_type: str | None
    ) -> CreateEmbeddedSendingResponse:
        """Private function to create document embedded sending."""
        from signnow_client import CreateDocumentEmbeddedSendingRequest
    
        # Map sending type to entity type for documents BEFORE making the request
        if sending_type == "send-invite":
            mapped_type = "invite"
        else:  # manage or edit
            mapped_type = "document"
    
        request_data = CreateDocumentEmbeddedSendingRequest(redirect_uri=redirect_uri, redirect_target=redirect_target, link_expiration=link_expiration, type=mapped_type)
    
        response = client.create_document_embedded_sending(token, entity_id, request_data)
    
        return CreateEmbeddedSendingResponse(sending_entity="document", sending_url=response.data.url)
  • Document group-specific helper calling SignNow client.create_document_group_embedded_sending
    def _create_document_group_embedded_sending(
        client: SignNowAPIClient, token: str, entity_id: str, redirect_uri: str | None, redirect_target: str | None, link_expiration: int | None, sending_type: str | None
    ) -> CreateEmbeddedSendingResponse:
        """Private function to create document group embedded sending."""
        from signnow_client import (
            CreateDocumentGroupEmbeddedSendingRequest as SignNowEmbeddedSendingRequest,
        )
    
        request_data = SignNowEmbeddedSendingRequest(redirect_uri=redirect_uri, redirect_target=redirect_target, link_expiration=link_expiration, type=sending_type)
    
        response = client.create_document_group_embedded_sending(token, entity_id, request_data)
    
        return CreateEmbeddedSendingResponse(sending_entity="document_group", sending_url=response.data.url)
  • Pydantic model for tool response: sending_entity and sending_url
    class CreateEmbeddedSendingResponse(BaseModel):
        """Response model for creating embedded sending."""
    
        sending_entity: str = Field(..., description="Type of sending entity: 'document', 'document_group', or 'invite'")
        sending_url: str = Field(..., description="URL for the embedded sending")
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 embedded sending for specific operations (manage, edit, send-invite) but doesn't describe what 'embedded sending' entails, what permissions are required, whether the operation is reversible, or what the output contains. It provides some context about entity types but lacks comprehensive behavioral details.

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 perfectly concise with two sentences that each earn their place: the first defines the purpose and scope, the second provides explicit usage guidance with alternative tool naming. No wasted words, well-structured, and front-loaded with essential information.

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 moderate complexity (6 parameters, 1 required), 100% schema coverage, and presence of an output schema, the description is reasonably complete. It clearly defines scope and provides usage differentiation from siblings. The main gap is lack of behavioral details about what 'embedded sending' actually creates/returns, but the output schema should cover 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 6 parameters thoroughly. The description adds minimal value beyond the schema by emphasizing the entity_type constraint ('ONLY for documents and document groups') but doesn't provide additional semantic context about parameters like redirect_uri behavior or link_expiration implications.

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 embedded sending for managing, editing, or sending invites') and resources ('document or document group'), and explicitly distinguishes it from sibling tools by stating it's 'ONLY for documents and document groups' and naming the alternative tool for templates.

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 documents and document groups') and when not to use it ('If you have template or template_group, use the alternative tool: create_embedded_sending_from_template'), clearly differentiating it from sibling alternatives.

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