siglio-mcp 1.0.2 → 1.0.4
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 +14 -6
- package/package.json +1 -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.4' });
|
|
160
166
|
|
|
161
167
|
const signerShape = z.object({
|
|
162
168
|
name: z.string().describe("The signer's full name."),
|
|
@@ -179,7 +185,7 @@ server.registerTool('send_for_signature', {
|
|
|
179
185
|
inputSchema: {
|
|
180
186
|
document_path: z.string().describe('Full path to the tagged PDF on this machine.'),
|
|
181
187
|
signers: z.array(signerShape).min(1).max(2)
|
|
182
|
-
.describe('One or two signers. With two,
|
|
188
|
+
.describe('One or two signers. With two, NOTIFICATION is sequential: the second is not notified until the first finishes. Signing order itself is NOT enforced: signer two\'s link exists from the moment the envelope is created and is reachable immediately, so never tell a user that Siglio makes the first person sign first.'),
|
|
183
189
|
delivery: z.enum(['email', 'sms', 'both']).default('email')
|
|
184
190
|
.describe('How to notify the signer. Texting is what Siglio is for and costs the same; ask the user if a text would be better.'),
|
|
185
191
|
document_name: z.string().optional().describe('What the signer sees it called. Defaults to the filename.'),
|
|
@@ -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