get_document_properties
Retrieve detailed properties of a BoldSign document, including status, metadata, sender and signer details, form fields, and history, by providing the unique document ID. Access is restricted to authorized users.
Instructions
Retrieve comprehensive details of a document in your BoldSign organization. This API allows authorized users, including senders, signers, team admins, and account admins, to access document properties by specifying the unique document ID. The response includes information such as status, metadata, sender and signer details, form fields, and document history. If an unauthorized user attempts to access the document, an unauthorized response will be returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentId | Yes | Required. The unique identifier (ID) of the document to retrieve. This can be obtained from the list documents tool. |
Implementation Reference
- The handler function that executes the core logic: initializes BoldSign DocumentApi, fetches document properties by ID, and handles response or error.async function getDocumentPropertiesHandler(payload: GetDocumentPropertiesSchemaType): Promise<McpResponse> { try { const documentApi = new DocumentApi(); documentApi.basePath = configuration.getBasePath(); documentApi.setApiKey(configuration.getApiKey()); const documentProperties: DocumentProperties = await documentApi.getProperties(payload.documentId); return handleMcpResponse({ data: documentProperties, }); } catch (error: any) { return handleMcpError(error); } }
- Zod input schema defining the required 'documentId' parameter.const GetDocumentPropertiesSchema = z.object({ documentId: commonSchema.InputIdSchema.describe( 'Required. The unique identifier (ID) of the document to retrieve. This can be obtained from the list documents tool.', ), });
- src/tools/documentsTools/getDocumentProperties.ts:17-26 (registration)Primary tool registration: defines the BoldSignTool with method name, description, schema, and wrapper handler calling the main handler.export const getDocumentPropertiesToolDefinition: BoldSignTool = { method: ToolNames.GetDocumentProperties.toString(), name: 'Get document properties', description: 'Retrieve comprehensive details of a document in your BoldSign organization. This API allows authorized users, including senders, signers, team admins, and account admins, to access document properties by specifying the unique document ID. The response includes information such as status, metadata, sender and signer details, form fields, and document history. If an unauthorized user attempts to access the document, an unauthorized response will be returned.', inputSchema: GetDocumentPropertiesSchema, async handler(args: unknown): Promise<McpResponse> { return await getDocumentPropertiesHandler(args as GetDocumentPropertiesSchemaType); }, };
- src/tools/documentsTools/index.ts:8-14 (registration)Includes the tool in the documents API tools array.export const documentsApiToolsDefinitions: BoldSignTool[] = [ getDocumentPropertiesToolDefinition, listDocumentsToolDefinition, listTeamDocumentsToolDefinition, sendReminderForDocumentToolDefinition, revokeDocumentToolDefinition, ];
- src/tools/index.ts:8-14 (registration)Final registration: spreads documentsApiToolsDefinitions into the main tools definitions array used by the MCP server.export const definitions: BoldSignTool[] = [ ...contactsApiToolsDefinitions, ...documentsApiToolsDefinitions, ...templatesApiToolsDefinitions, ...usersApiToolsDefinitions, ...teamsApiToolsDefinitions, ];