cascrow-mcp 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/index.js +26 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -244,20 +244,28 @@ const TOOLS = [
244
244
  {
245
245
  name: "cascrow_handoff",
246
246
  description:
247
- "Send a contract invite to a Builder agent by email. " +
247
+ "Send a contract invite to a Builder agent by Agent ID. " +
248
248
  "Use this after cascrow_create_contract to delegate the work to another agent. " +
249
249
  "The Builder agent will automatically pick up the invite via cascrow_check_invites.",
250
250
  inputSchema: {
251
251
  type: "object",
252
- required: ["inviteCode", "builderEmail", "contractId"],
252
+ required: ["inviteCode", "builderAgentId", "contractId"],
253
253
  properties: {
254
254
  inviteCode: { type: "string", description: "The invite code returned by cascrow_create_contract" },
255
- builderEmail: { type: "string", description: "Email address of the Builder agent" },
255
+ builderAgentId: { type: "string", description: "The Agent ID of the Builder agent (from cascrow_get_agent_id)" },
256
256
  contractId: { type: "string", description: "The contract ID returned by cascrow_create_contract" },
257
257
  message: { type: "string", description: "Optional instructions for the Builder agent" },
258
258
  },
259
259
  },
260
260
  },
261
+ {
262
+ name: "cascrow_get_agent_id",
263
+ description: "Get this agent's own Agent ID. Share this with Requester agents so they can send you work via cascrow_handoff.",
264
+ inputSchema: {
265
+ type: "object",
266
+ properties: {},
267
+ },
268
+ },
261
269
  {
262
270
  name: "cascrow_check_invites",
263
271
  description:
@@ -293,6 +301,7 @@ async function handleCreateContract({ milestones }) {
293
301
 
294
302
  return {
295
303
  contractId: data.contractId,
304
+ inviteCode: data.inviteLink,
296
305
  contractUrl,
297
306
  milestoneCount: milestones.length,
298
307
  message: `Contract created with ${milestones.length} milestone(s). View it here: ${contractUrl}`,
@@ -374,11 +383,19 @@ async function handleGetContract({ contractId }) {
374
383
  return data;
375
384
  }
376
385
 
377
- async function handleHandoff({ inviteCode, builderEmail, contractId, message }) {
378
- const data = await apiPost("/api/agent/handoff", { inviteCode, builderEmail, contractId, message });
386
+ async function handleHandoff({ inviteCode, builderAgentId, contractId, message }) {
387
+ const data = await apiPost("/api/agent/handoff", { inviteCode, builderAgentId, contractId, message });
379
388
  return {
380
389
  handoffId: data.handoffId,
381
- message: `Invite sent to Builder agent (${builderEmail}). They will pick it up automatically via cascrow_check_invites.`,
390
+ message: `Contract handed off to Agent ${builderAgentId}. They will pick it up automatically via cascrow_check_invites.`,
391
+ };
392
+ }
393
+
394
+ async function handleGetAgentId() {
395
+ const data = await apiGet("/api/agent/me");
396
+ return {
397
+ agentId: data.agentId,
398
+ message: `Your Agent ID is: ${data.agentId}. Share this with Requester agents so they can send you work.`,
382
399
  };
383
400
  }
384
401
 
@@ -435,6 +452,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
435
452
  case "cascrow_check_invites":
436
453
  result = await handleCheckInvites();
437
454
  break;
455
+ case "cascrow_get_agent_id":
456
+ result = await handleGetAgentId();
457
+ break;
438
458
  default:
439
459
  throw new Error(`Unknown tool: ${name}`);
440
460
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cascrow-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for Cascrow — agentic escrow and verification",
5
5
  "type": "module",
6
6
  "main": "index.js",