siglio-mcp 1.0.1 → 1.0.3
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/index.js +13 -5
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -132,10 +132,16 @@ function describe(env) {
|
|
|
132
132
|
'Environment: ' + env.environment + (env.environment === 'sandbox' ? ' (free, delivers for real)' : ' (billable)'),
|
|
133
133
|
];
|
|
134
134
|
const people = env.signers || (env.signer ? [env.signer] : []);
|
|
135
|
+
const done = env.state === 'completed';
|
|
135
136
|
people.forEach((s, i) => {
|
|
137
|
+
// On a completed envelope every signer has signed, whether or not the time
|
|
138
|
+
// was recorded. signed_at null means "no recorded time", never "unsigned",
|
|
139
|
+
// so never say "not yet signed" about a finished document.
|
|
140
|
+
const status = s.signed_at ? ' — signed ' + s.signed_at
|
|
141
|
+
: done ? ' — signed, time not recorded'
|
|
142
|
+
: ' — not yet signed';
|
|
136
143
|
lines.push('Signer ' + (i + 1) + ': ' + s.name +
|
|
137
|
-
[s.email, s.phone].filter(Boolean).map((x) => ' <' + x + '>').join('') +
|
|
138
|
-
(s.signed_at ? ' — signed ' + s.signed_at : ' — not yet signed'));
|
|
144
|
+
[s.email, s.phone].filter(Boolean).map((x) => ' <' + x + '>').join('') + status);
|
|
139
145
|
if (s.signing_url) lines.push(' link: ' + s.signing_url);
|
|
140
146
|
});
|
|
141
147
|
if (!people.length && env.signing_url) lines.push('Signing link: ' + env.signing_url);
|
|
@@ -156,7 +162,7 @@ const fail = (e) => ({ content: [{ type: 'text', text: 'Failed: ' + (e && e.mess
|
|
|
156
162
|
|
|
157
163
|
// --- the server ----------------------------------------------------------
|
|
158
164
|
|
|
159
|
-
const server = new McpServer({ name: 'siglio', version: '1.0.
|
|
165
|
+
const server = new McpServer({ name: 'siglio', version: '1.0.3' });
|
|
160
166
|
|
|
161
167
|
const signerShape = z.object({
|
|
162
168
|
name: z.string().describe("The signer's full name."),
|
|
@@ -212,7 +218,9 @@ server.registerTool('check_envelope', {
|
|
|
212
218
|
title: 'Check an envelope',
|
|
213
219
|
description:
|
|
214
220
|
'Returns the current state of an envelope: whether it was delivered, opened, signed, or cancelled, ' +
|
|
215
|
-
'and when each signer signed. Use this to answer "has it been signed yet?"
|
|
221
|
+
'and when each signer signed. Use this to answer "has it been signed yet?".\n\n' +
|
|
222
|
+
'Read the STATE for whether it is signed, not the signer timestamp. On a completed envelope every ' +
|
|
223
|
+
'signer has signed; a missing signature time only means the time was not recorded.',
|
|
216
224
|
inputSchema: { envelope_id: z.string().describe('The id returned when it was sent, e.g. env_7mmyc...') },
|
|
217
225
|
}, async ({ envelope_id }) => {
|
|
218
226
|
try { return text(describe(await api('GET', '/v1/envelopes/' + encodeURIComponent(envelope_id)))); }
|
|
@@ -226,7 +234,7 @@ server.registerTool('download_signed_document', {
|
|
|
226
234
|
'that is still out, or only partially signed, has no signed document yet.',
|
|
227
235
|
inputSchema: {
|
|
228
236
|
envelope_id: z.string().describe('The envelope id.'),
|
|
229
|
-
save_path: z.string().describe('Full path to write the PDF to, e.g.
|
|
237
|
+
save_path: z.string().describe('Full path to write the PDF to, e.g. C:\\Users\\me\\Documents\\signed.pdf'),
|
|
230
238
|
},
|
|
231
239
|
}, async ({ envelope_id, save_path }) => {
|
|
232
240
|
try {
|
package/package.json
CHANGED