cascrow-mcp 1.1.0 → 1.1.1

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 +25 -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:
@@ -374,11 +382,19 @@ async function handleGetContract({ contractId }) {
374
382
  return data;
375
383
  }
376
384
 
377
- async function handleHandoff({ inviteCode, builderEmail, contractId, message }) {
378
- const data = await apiPost("/api/agent/handoff", { inviteCode, builderEmail, contractId, message });
385
+ async function handleHandoff({ inviteCode, builderAgentId, contractId, message }) {
386
+ const data = await apiPost("/api/agent/handoff", { inviteCode, builderAgentId, contractId, message });
379
387
  return {
380
388
  handoffId: data.handoffId,
381
- message: `Invite sent to Builder agent (${builderEmail}). They will pick it up automatically via cascrow_check_invites.`,
389
+ message: `Contract handed off to Agent ${builderAgentId}. They will pick it up automatically via cascrow_check_invites.`,
390
+ };
391
+ }
392
+
393
+ async function handleGetAgentId() {
394
+ const data = await apiGet("/api/agent/me");
395
+ return {
396
+ agentId: data.agentId,
397
+ message: `Your Agent ID is: ${data.agentId}. Share this with Requester agents so they can send you work.`,
382
398
  };
383
399
  }
384
400
 
@@ -435,6 +451,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
435
451
  case "cascrow_check_invites":
436
452
  result = await handleCheckInvites();
437
453
  break;
454
+ case "cascrow_get_agent_id":
455
+ result = await handleGetAgentId();
456
+ break;
438
457
  default:
439
458
  throw new Error(`Unknown tool: ${name}`);
440
459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cascrow-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "MCP server for Cascrow — agentic escrow and verification",
5
5
  "type": "module",
6
6
  "main": "index.js",