get_invite_status
Check the status of signing invitations for documents or document groups in SignNow. Use this tool to monitor invite progress and track signature completion.
Instructions
Get invite status for a document or document group
Note: If your client supports MCP Resources, prefer the resource version of this endpoint; this tool exists as a compatibility fallback for tool-only clients.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | ID of the document or document group | |
| entity_type | No | 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. |
Implementation Reference
- MCP tool handler function for 'get_invite_status'. Includes registration decorator, input schema via Annotated Fields, and delegates to internal implementation.@mcp.tool(name="get_invite_status", description="Get invite status for a document or document group" + TOOL_FALLBACK_SUFFIX, tags=["invite", "status", "document", "document_group", "workflow"]) def get_invite_status( 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, ) -> InviteStatus: return _get_invite_status_impl(ctx, entity_id, entity_type)
- Helper function that obtains authentication token and client, then calls the core _get_invite_status logic.def _get_invite_status_impl(ctx: Context, entity_id: str, entity_type: Literal["document", "document_group"] | None) -> InviteStatus: token, client = _get_token_and_client(token_provider) return _get_invite_status(entity_id, entity_type, token, client)
- Core implementation of invite status retrieval. Determines entity type if needed, fetches document or document group via SignNow API, and constructs InviteStatus object using helper functions _get_document_status or _get_document_group_status.def _get_invite_status(entity_id: str, entity_type: Literal["document", "document_group"] | None, token: str, client: SignNowAPIClient) -> InviteStatus: """Private function to get invite status 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. token: Access token for SignNow API client: SignNow API client instance Returns: InviteStatus with invite ID, status, and steps information """ # Determine entity type if not provided and get entity data document_group = None document = None 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_v2(token, entity_id) entity_type = "document_group" except Exception: # If document group not found, try document try: document = 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 else: # Entity type is provided, get the entity data if entity_type == "document_group": document_group = client.get_document_group_v2(token, entity_id) else: document = client.get_document(token, entity_id) if entity_type == "document_group": # Get document group status using the already fetched data return _get_document_group_status(client, token, document_group, entity_id) else: # Get document status using the already fetched data return _get_document_status(client, token, document)