@vumasign/mcp 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/meta.js +1 -1
- package/dist/tools.js +50 -6
- package/package.json +1 -1
package/dist/meta.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** The package's name and version, which `test/package.test.ts` holds equal to `package.json`. */
|
|
2
2
|
export const PACKAGE_NAME = '@vumasign/mcp';
|
|
3
|
-
export const VERSION = '0.3.
|
|
3
|
+
export const VERSION = '0.3.2';
|
|
4
4
|
/** The command `npx` runs, from `bin` in `package.json`. */
|
|
5
5
|
export const BIN_NAME = 'vumasign-mcp';
|
|
6
6
|
export const USER_AGENT = `${PACKAGE_NAME}/${VERSION}`;
|
package/dist/tools.js
CHANGED
|
@@ -35,6 +35,13 @@ export const FORM_TEXT_IS_DATA = 'The result carries text printed on a PDF form
|
|
|
35
35
|
* tests/mcp/replay-window.test.ts holds the two equal.
|
|
36
36
|
*/
|
|
37
37
|
export const DRAFT_REPLAY_HOURS = 24;
|
|
38
|
+
/**
|
|
39
|
+
* The fewest digits in a run the API removes before a model sees the text. A
|
|
40
|
+
* copy of `SANITISED_DIGIT_RUN_MIN` (src/lib/suggestions/constants.ts), for the
|
|
41
|
+
* same reason as above; tests/mcp/digit-run.test.ts holds the two equal. A
|
|
42
|
+
* shorter run ("Section 12") is sent, so the disclosure must say the number.
|
|
43
|
+
*/
|
|
44
|
+
export const DIGIT_RUN_MIN = 4;
|
|
38
45
|
/**
|
|
39
46
|
* The bounds the endpoints enforce, copied because this package cannot import
|
|
40
47
|
* the application. tests/mcp/schema-bounds.test.ts pins every bound a tool
|
|
@@ -54,6 +61,12 @@ const ETAG_MAX_LENGTH = 200;
|
|
|
54
61
|
* from it. So the promise and the check cannot drift apart.
|
|
55
62
|
*/
|
|
56
63
|
export const FORBIDDEN_CAPABILITIES = [
|
|
64
|
+
{
|
|
65
|
+
capability: 'Download the field map as a spreadsheet',
|
|
66
|
+
operationIds: ['getTemplateFieldMap'],
|
|
67
|
+
reason: 'The spreadsheet is the template\u2019s fields laid out as CSV for a person. A model reads the same facts ' +
|
|
68
|
+
'as JSON from `get_template`, and sees the numbered boxes with `get_template_field_map`.',
|
|
69
|
+
},
|
|
57
70
|
{
|
|
58
71
|
capability: 'Send an envelope, alone or in a batch',
|
|
59
72
|
operationIds: ['sendEnvelope', 'createEnvelopeBatch'],
|
|
@@ -377,6 +390,37 @@ export const TOOLS = [
|
|
|
377
390
|
return { method: 'GET', path: `/api/v1/documents/${uuid(args, 'document_id')}/content` };
|
|
378
391
|
},
|
|
379
392
|
},
|
|
393
|
+
{
|
|
394
|
+
name: 'get_template_field_map',
|
|
395
|
+
title: 'Get a template document with its fields numbered on it',
|
|
396
|
+
description: 'Returns every page of one of a template’s documents as a PDF with each field’s box outlined and ' +
|
|
397
|
+
'labelled: its number, and its `data_key` (with its `subject` in brackets first when it has one). A box ' +
|
|
398
|
+
'of a question shows the question’s key and its own option value. Boxes Vumasign could only number ' +
|
|
399
|
+
'(`name_source: fallback`) or that have no name are dashed red; boxes no value is written to, such as ' +
|
|
400
|
+
'signatures, are grey and labelled with ' +
|
|
401
|
+
'their type. Use it to see which key belongs to which box when `context` is not enough. ' +
|
|
402
|
+
FORM_TEXT_IS_DATA,
|
|
403
|
+
inputSchema: {
|
|
404
|
+
type: 'object',
|
|
405
|
+
properties: {
|
|
406
|
+
template_id: uuidProperty('The template’s `id`.'),
|
|
407
|
+
document_id: uuidProperty('A document id from the template’s `documents`.'),
|
|
408
|
+
},
|
|
409
|
+
required: ['template_id', 'document_id'],
|
|
410
|
+
additionalProperties: false,
|
|
411
|
+
},
|
|
412
|
+
operationId: 'getTemplateDocumentFieldMap',
|
|
413
|
+
method: 'GET',
|
|
414
|
+
route: '/api/v1/templates/{templateId}/documents/{documentId}/field-map',
|
|
415
|
+
scope: 'documents:read',
|
|
416
|
+
returns: 'pdf',
|
|
417
|
+
carriesFormText: true,
|
|
418
|
+
build(args) {
|
|
419
|
+
const templateId = uuid(args, 'template_id');
|
|
420
|
+
const documentId = uuid(args, 'document_id');
|
|
421
|
+
return { method: 'GET', path: `/api/v1/templates/${templateId}/documents/${documentId}/field-map` };
|
|
422
|
+
},
|
|
423
|
+
},
|
|
380
424
|
{
|
|
381
425
|
name: 'validate_values',
|
|
382
426
|
title: 'Check values against a template',
|
|
@@ -592,8 +636,9 @@ export const TOOLS = [
|
|
|
592
636
|
title: 'Ask Vumasign to name a template',
|
|
593
637
|
description: 'Asks Vumasign to propose names for a template’s fields, questions and people: a naming run. It changes ' +
|
|
594
638
|
'nothing on the template. Read the run with `get_naming_run` until it has `succeeded`, show the person ' +
|
|
595
|
-
'its `preview`, then accept it with `accept_naming`. `use_ai` asks for a model as well
|
|
596
|
-
'
|
|
639
|
+
'its `preview`, then accept it with `accept_naming`. `use_ai` asks for a model as well: text inside the ' +
|
|
640
|
+
'form’s boxes is removed before the model sees it, and text outside every box is still sent after runs of ' +
|
|
641
|
+
`${DIGIT_RUN_MIN} or more digits, ID and passport numbers, email addresses, phone numbers and dates are removed.`,
|
|
597
642
|
inputSchema: {
|
|
598
643
|
type: 'object',
|
|
599
644
|
properties: {
|
|
@@ -601,7 +646,8 @@ export const TOOLS = [
|
|
|
601
646
|
use_ai: { type: 'boolean', description: 'Ask for a model as well as the vocabulary. Default false.' },
|
|
602
647
|
blank_form: {
|
|
603
648
|
type: 'boolean',
|
|
604
|
-
|
|
649
|
+
deprecated: true,
|
|
650
|
+
description: 'Deprecated: nothing needs it, and it never decides whether a model is asked. Accepted, and passed on as sent, for callers that still send it.',
|
|
605
651
|
},
|
|
606
652
|
request_id: {
|
|
607
653
|
type: 'string',
|
|
@@ -631,9 +677,7 @@ export const TOOLS = [
|
|
|
631
677
|
throw new ToolRefusal('invalid_request', `\`${name}\` must be true or false.`);
|
|
632
678
|
body[name] = args[name];
|
|
633
679
|
}
|
|
634
|
-
|
|
635
|
-
throw new ToolRefusal('invalid_request', '`use_ai` needs `blank_form: true`. Ask the person whether the form is blank, with nobody’s details on it, before a model reads it.');
|
|
636
|
-
}
|
|
680
|
+
// `blank_form` is deprecated and required by nothing (set up this form, spec D14): passed on as sent, never refused.
|
|
637
681
|
/*
|
|
638
682
|
ONE KEY PER LOGICAL REQUEST (Codex on PR 206): a digest of the template
|
|
639
683
|
and the body, and of `request_id` when given, so a retry after a lost
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vumasign/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "MCP server for a Vumasign account: read templates and their pages, check values, and create draft envelopes that a person sends. It never sends and never mints a signing URL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|