Skip to main content
Glama

revoke_document

Cancel in-progress document signing processes by revoking access, preventing signers from viewing or signing documents that are no longer needed.

Instructions

The document signing process can be called off or revoked by the sender of the document. Once you revoke a document, signers can no longer view or sign it. Revoke action can only be performed on the in-progress status documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentIdYesRequired. The unique identifier (ID) of the document to revoke. This can be obtained from the list documents tool.
messageYesThe exact reason for performing a revoke action.
onBehalfOfNoOptional. Email address of the sender when creating a document on their behalf. This email can be retrieved from the `behalfOf` property in the get document or list documents tool.

Implementation Reference

  • The revokeDocumentHandler function contains the core implementation logic for the revoke_document tool. It initializes the DocumentApi, constructs the RevokeDocument request, calls the BoldSign API to revoke the document, and handles the response or errors.
    async function revokeDocumentHandler(payload: RevokeDocumentSchemaType): Promise<McpResponse> { try { const documentApi = new DocumentApi(); documentApi.basePath = configuration.getBasePath(); documentApi.setApiKey(configuration.getApiKey()); const revokeDocumentRequest: RevokeDocument = new RevokeDocument(); revokeDocumentRequest.message = payload.message; revokeDocumentRequest.onBehalfOf = payload.onBehalfOf; const documentResponse: returnTypeI = await documentApi.revokeDocument( payload.documentId, revokeDocumentRequest, ); return handleMcpResponse({ data: documentResponse?.response?.data ?? documentResponse, }); } catch (error: any) { return handleMcpError(error); } }
  • Zod schema defining the input parameters for the revoke_document tool (documentId, message, optional onBehalfOf) and the inferred TypeScript type.
    const RevokeDocumentSchema = z.object({ documentId: commonSchema.InputIdSchema.describe( 'Required. The unique identifier (ID) of the document to revoke. This can be obtained from the list documents tool.', ), message: z.string().describe('The exact reason for performing a revoke action.'), onBehalfOf: commonSchema.EmailSchema.optional() .nullable() .describe( 'Optional. Email address of the sender when creating a document on their behalf. This email can be retrieved from the `behalfOf` property in the get document or list documents tool.', ), }); type RevokeDocumentSchemaType = z.infer<typeof RevokeDocumentSchema>;
  • Exports the BoldSignTool definition for 'revoke_document', specifying the method name, description, input schema, and handler function.
    export const revokeDocumentToolDefinition: BoldSignTool = { method: ToolNames.RevokeDocument.toString(), name: 'Revoke document', description: 'The document signing process can be called off or revoked by the sender of the document. Once you revoke a document, signers can no longer view or sign it. Revoke action can only be performed on the in-progress status documents.', inputSchema: RevokeDocumentSchema, async handler(args: unknown): Promise<McpResponse> { return await revokeDocumentHandler(args as RevokeDocumentSchemaType); }, };
  • Includes the revokeDocumentToolDefinition in the array of documents API tools, which is further aggregated into the main tools list.
    export const documentsApiToolsDefinitions: BoldSignTool[] = [ getDocumentPropertiesToolDefinition, listDocumentsToolDefinition, listTeamDocumentsToolDefinition, sendReminderForDocumentToolDefinition, revokeDocumentToolDefinition, ];
  • Defines the enum value ToolNames.RevokeDocument as 'revoke_document', used in the tool method name.
    RevokeDocument = 'revoke_document',

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/Synctest-hub/boldsign-mcp'

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