Skip to main content
Glama
Synctest-hub

BoldSign MCP Server

by Synctest-hub

list_templates

Retrieve and filter BoldSign e-signature templates by type, creator, labels, date range, brand IDs, or search criteria to manage document workflows.

Instructions

Retrieves a paginated list of BoldSign templates with options to filter by page number, page size, search key, template type, creator, labels, creation date range, and brand IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeYes
pageYes
searchKeyNoOptional. A search key to filter templates by properties such as name and email address. Provides a way to refine results based on specific criteria.
templateTypeYesOptional. Filters templates based on their type (all, mytemplates, sharedtemplate). Defaults to 'all'.all
createdByNoOptional. Filters templates based on the email address(es) of their creators.
templateLabelsNoOptional. Filters templates based on associated labels (tags).
startDateNoOptional. Filters templates created on or after this date (in YYYY-MM-DD format).
endDateNoOptional. Filters templates created on or before this date (in YYYY-MM-DD format).
brandIdsNoOptional. Filters templates associated with the specified brand IDs.

Implementation Reference

  • The primary handler function implementing the 'list_templates' tool. It initializes the TemplateApi, calls listTemplates with the provided parameters, transforms the result, and returns the MCP response or handles errors.
    async function listTemplatesHandler(payload: ListTemplatesSchemaType): Promise<McpResponse> {
      try {
        const templateApi = new TemplateApi();
        templateApi.basePath = configuration.getBasePath();
        templateApi.setApiKey(configuration.getApiKey());
        const templateRecords: TemplateRecords = await templateApi.listTemplates(
          payload.page,
          payload.templateType ?? undefined,
          payload.pageSize ?? undefined,
          payload.searchKey ?? undefined,
          undefined,
          payload.createdBy ?? undefined,
          payload.templateLabels ?? undefined,
          payload.startDate ?? undefined,
          payload.endDate ?? undefined,
          payload.brandIds ?? undefined,
        );
        setAsTemplate(templateRecords.result);
        return handleMcpResponse({
          data: templateRecords,
        });
      } catch (error: any) {
        return handleMcpError(error);
      }
    }
  • Zod schema defining the input validation for the 'list_templates' tool parameters including pagination, search, filters by type, creator, labels, dates, and brands.
    const ListTemplatesSchema = 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 key to filter templates by properties such as name and email address. Provides a way to refine results based on specific criteria.',
      ),
      templateType: z
        .enum(['all', 'mytemplates', 'sharedtemplate'])
        .optional()
        .nullable()
        .default('all')
        .describe(
          "Optional. Filters templates based on their type (all, mytemplates, sharedtemplate). Defaults to 'all'.",
        ),
      createdBy: z
        .array(commonSchema.EmailSchema.describe('Email address of the template creator.'))
        .optional()
        .nullable()
        .describe('Optional. Filters templates based on the email address(es) of their creators.'),
      templateLabels: z
        .array(z.string().describe('Label of the template.'))
        .optional()
        .nullable()
        .describe('Optional. Filters templates based on associated labels (tags).'),
      startDate: commonSchema.OptionalDateSchema.describe(
        'Optional. Filters templates created on or after this date (in YYYY-MM-DD format).',
      ),
      endDate: commonSchema.OptionalDateSchema.describe(
        'Optional. Filters templates created on or before this date (in YYYY-MM-DD format).',
      ),
      brandIds: z
        .array(
          commonSchema.InputIdSchema.describe(
            'The unique identifier (ID) of the brand to be used for depicting a brand.',
          ),
        )
        .optional()
        .nullable()
        .describe('Optional. Filters templates associated with the specified brand IDs.'),
    });
  • Tool definition object that registers the 'list_templates' tool, specifying its method name ('list_templates'), description, input schema, and wrapper handler.
    export const listTemplatesToolDefinition: BoldSignTool = {
      method: ToolNames.ListTemplates.toString(),
      name: 'List templates',
      description:
        'Retrieves a paginated list of BoldSign templates with options to filter by page number, page size, search key, template type, creator, labels, creation date range, and brand IDs.',
      inputSchema: ListTemplatesSchema,
      async handler(args: unknown): Promise<McpResponse> {
        return await listTemplatesHandler(args as ListTemplatesSchemaType);
      },
    };
  • Registration of the listTemplatesToolDefinition in the templates API tools definitions array, likely used for overall tool registration.
    export const templatesApiToolsDefinitions: BoldSignTool[] = [
      sendDocumentFromTemplateDynamicToolDefinition,
      listTemplatesToolDefinition,
      getTemplatePropertiesToolDefinition,
    ];
  • Enum definition providing the string identifier 'list_templates' for the tool name, used in the tool method.
    ListTemplates = 'list_templates',

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

C2.9/5.0
Behavior2/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 mentions pagination and filtering options, but doesn't describe response format, error conditions, rate limits, authentication needs, or whether it's read-only (implied by 'retrieves' but not explicit). For a tool with 9 parameters and no annotation coverage, this leaves significant behavioral gaps.

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 a single, well-structured sentence that efficiently communicates core functionality and parameter scope. It's appropriately sized for a list operation with multiple filters. No wasted words, though it could be slightly more front-loaded by emphasizing the primary action before listing all parameters.

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 read operation with no output schema and no annotations, the description adequately covers what the tool does but lacks important context. It doesn't describe the return format (what a 'template' object contains), pagination mechanics beyond mentioning it exists, or error handling. With 9 parameters and no structured output documentation, more completeness would be beneficial.

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 78%, so the schema already documents most parameters well. The description lists all 9 parameters by name, adding minimal semantic value beyond what's in the schema. It doesn't explain parameter interactions, default behaviors beyond what's in schema, or provide usage examples. Baseline 3 is appropriate given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieves') and resource ('BoldSign templates'), and specifies it's paginated. It doesn't explicitly differentiate from sibling tools like 'get_template_properties', but the verb 'list' versus 'get' implies a collection versus single item. The purpose is specific and unambiguous.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_template_properties' or 'list_documents'. It lists filtering options but doesn't indicate scenarios where this tool is preferred over others. There's no mention of prerequisites, access requirements, or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.