Skip to main content
Glama
Synctest-hub

BoldSign MCP Server

list_documents

Retrieve and filter your e-signature documents from BoldSign with pagination, search, and status options to manage your workflow efficiently.

Instructions

Retrieve a paginated list of documents available in your My Documents section. This API fetches document details such as status, sender, recipient, labels, transmission type, creation date, and modification date, with options for filtering and paginated navigation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeYes
pageYes
searchKeyNoOptional. A search term used to filter the document list. The API will return documents matching details like document title, document ID, sender name, or recipient name.
sentByNoOptional. Filter documents by sender email addresses. One or more sender email IDs can be specified.
recipientsNoOptional. Filter documents by signer email addresses. One or more signer email IDs can be specified.
startDateNoOptional. Start transmit date range of the document. The date should be in a valid date-time format.
endDateNoOptional. End transmit date range of the document. The date should be in a valid date-time format.
labelsYesOptional. Labels associated with documents. Used to filter the list by specific document tags.
transmitTypeYesOptional. Type of transmission to filter documents if the user is both sender, recipient or both.Both
statusYesOptional. Filter documents based on their current status.
nextCursorNoOptional. Cursor value for pagination beyond 10,000 records. Set to the cursor of the last retrieved document.
brandIdsNoOptional. Filters documents based on associated brand IDs. Only documents linked to the specified brands will be retrieved.
dateFilterTypeNoOptional. Type of date filter applied to documents. Available options: 'SentBetween' and 'Expiring'.

Implementation Reference

  • The handler function that implements the core logic of the 'list_documents' tool. It initializes the BoldSign DocumentApi client, calls the listDocuments API method with parsed parameters, and handles the response or errors using utility functions.
    async function listDocumentsHandler(payload: ListDocumentsSchemaType): Promise<McpResponse> {
      try {
        const documentApi = new DocumentApi();
        documentApi.basePath = configuration.getBasePath();
        documentApi.setApiKey(configuration.getApiKey());
        const documentRecords: DocumentRecords = await documentApi.listDocuments(
          payload.page,
          payload.sentBy ?? undefined,
          payload.recipients ?? undefined,
          (payload.transmitType as any) ?? undefined,
          payload.dateFilterType ?? undefined,
          payload.pageSize ?? undefined,
          payload.startDate ?? undefined,
          payload.status ?? undefined,
          payload.endDate ?? undefined,
          payload.searchKey ?? undefined,
          payload.labels ?? undefined,
          payload.nextCursor ?? undefined,
          payload.brandIds ?? undefined,
        );
        return handleMcpResponse({
          data: documentRecords,
        });
      } catch (error: any) {
        return handleMcpError(error);
      }
    }
  • Zod schema defining the input parameters and validation for the 'list_documents' tool, including pagination, filters, status, dates, and other query options.
    const ListDocumentsSchema = z.object({
      pageSize: z.number().int().min(1).max(100),
      page: z.number().int().min(1).default(1),
      searchKey: commonSchema.OptionalStringSchema.describe(
        'Optional. A search term used to filter the document list. The API will return documents matching details like document title, document ID, sender name, or recipient name.',
      ),
      sentBy: z
        .array(commonSchema.EmailSchema.describe('Email address of the sender.'))
        .optional()
        .describe(
          'Optional. Filter documents by sender email addresses. One or more sender email IDs can be specified.',
        ),
      recipients: z
        .array(commonSchema.EmailSchema.describe('Email address of the signer.'))
        .optional()
        .describe(
          'Optional. Filter documents by signer email addresses. One or more signer email IDs can be specified.',
        ),
      startDate: commonSchema.OptionalDateSchema.describe(
        'Optional. Start transmit date range of the document. The date should be in a valid date-time format.',
      ),
      endDate: commonSchema.OptionalDateSchema.describe(
        'Optional. End transmit date range of the document. The date should be in a valid date-time format.',
      ),
      labels: z
        .array(z.string().describe('Label of the document.'))
        .optional()
        .default([])
        .describe(
          'Optional. Labels associated with documents. Used to filter the list by specific document tags.',
        ),
      transmitType: z
        .enum(['Sent', 'Received', 'Both'])
        .optional()
        .default('Both')
        .describe(
          'Optional. Type of transmission to filter documents if the user is both sender, recipient or both.',
        ),
      status: z
        .array(
          z
            .enum([
              'None',
              'WaitingForMe',
              'WaitingForOthers',
              'NeedAttention',
              'Completed',
              'Declined',
              'Revoked',
              'Expired',
              'Scheduled',
              'Draft',
            ])
            .default('None'),
        )
        .optional()
        .default([])
        .describe('Optional. Filter documents based on their current status.'),
      nextCursor: z
        .number()
        .optional()
        .describe(
          'Optional. Cursor value for pagination beyond 10,000 records. Set to the cursor of the last retrieved document.',
        ),
      brandIds: z
        .array(commonSchema.InputIdSchema.describe('Unique identifier (ID) of the brand.'))
        .optional()
        .describe(
          'Optional. Filters documents based on associated brand IDs. Only documents linked to the specified brands will be retrieved.',
        ),
      dateFilterType: z
        .enum(['SentBetween', 'Expiring'])
        .optional()
        .describe(
          "Optional. Type of date filter applied to documents. Available options: 'SentBetween' and 'Expiring'.",
        ),
    });
  • Tool definition object that registers the 'list_documents' tool, specifying its method name, description, input schema, and handler wrapper.
    export const listDocumentsToolDefinition: BoldSignTool = {
      method: ToolNames.ListDocuments.toString(),
      name: 'List documents',
      description:
        'Retrieve a paginated list of documents available in your My Documents section. This API fetches document details such as status, sender, recipient, labels, transmission type, creation date, and modification date, with options for filtering and paginated navigation.',
      inputSchema: ListDocumentsSchema,
      async handler(args: unknown): Promise<McpResponse> {
        return await listDocumentsHandler(args as ListDocumentsSchemaType);
      },
    };
  • Array that registers the 'list_documents' tool definition as part of the documents API tools group.
    export const documentsApiToolsDefinitions: BoldSignTool[] = [
      getDocumentPropertiesToolDefinition,
      listDocumentsToolDefinition,
      listTeamDocumentsToolDefinition,
      sendReminderForDocumentToolDefinition,
      revokeDocumentToolDefinition,
    ];
  • Main tools definitions array that includes the documents tools group, thereby registering the 'list_documents' tool for the MCP server.
    export const definitions: BoldSignTool[] = [
      ...contactsApiToolsDefinitions,
      ...documentsApiToolsDefinitions,
      ...templatesApiToolsDefinitions,
      ...usersApiToolsDefinitions,
      ...teamsApiToolsDefinitions,
    ];
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It effectively describes the paginated nature, filtering options, and data fields returned (status, sender, recipient, etc.), which are valuable behavioral traits. However, it doesn't mention authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though implied by 'Retrieve').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

The description is appropriately sized with two sentences. The first sentence clearly states the core purpose, and the second adds valuable details about returned data and capabilities. There's minimal waste, though the list of data fields could be slightly more concise. The structure is front-loaded with the main purpose first.

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

Completeness3/5

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

For a complex tool with 13 parameters, no annotations, and no output schema, the description provides adequate but incomplete context. It covers the basic purpose, data returned, and filtering capabilities, but doesn't address authentication, error handling, response format details, or parameter dependencies. Given the complexity, more comprehensive guidance would be helpful.

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 85%, so the schema already documents most parameters well. The description adds some value by mentioning 'options for filtering and paginated navigation' and listing example data fields, but doesn't provide additional semantic context beyond what's in the parameter descriptions. It doesn't explain parameter interactions or provide usage examples.

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 verb ('Retrieve'), resource ('paginated list of documents'), and scope ('available in your My Documents section'). It distinguishes from siblings like 'list_team_documents' by specifying the personal document scope, and from 'get_document_properties' by focusing on listing rather than retrieving detailed properties of a single document.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Retrieve a paginated list of documents available in your My Documents section'), but doesn't explicitly state when not to use it or name specific alternatives. It implies usage for listing personal documents with filtering capabilities, but lacks explicit exclusions or comparisons to sibling tools like 'list_team_documents'.

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

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