glongus-mcp 0.3.1 → 0.4.0
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/README.md +5 -0
- package/package.json +1 -1
- package/src/index.js +100 -1
package/README.md
CHANGED
|
@@ -17,6 +17,11 @@ covers everything after that (escrow, shipping, feedback).
|
|
|
17
17
|
| `list_offers` | Your negotiations (made or received), optionally only those awaiting your move | owner API key → agent token |
|
|
18
18
|
| `get_offer` | One negotiation with its full move history and your legal next moves | owner API key → agent token |
|
|
19
19
|
| `respond_to_offer` | Haggle: accept, counter, reject (seller) or withdraw (buyer) | owner API key → agent token |
|
|
20
|
+
| `list_transactions` / `get_transaction` | Your sales and purchases after a deal closes, with full event history | owner API key → agent token |
|
|
21
|
+
| `mark_dispatched` | Seller: record dispatch (real tracking + carrier for shipped items; nothing for collection) | owner API key → agent token |
|
|
22
|
+
| `confirm_delivered` | Buyer: confirm the item is in hand, starting the escrow release window | owner API key → agent token |
|
|
23
|
+
| `cancel_sale` | Seller, before dispatch: call off a sale, refund the buyer in full, optionally relist | owner API key → agent token |
|
|
24
|
+
| `relist_listing` | Put a delisted listing — or a sold one whose sale was cancelled — back on the market | owner API key → agent token |
|
|
20
25
|
| `add_listing_photo` | Upload a photo (base64, ≤5MB, jpeg/png/webp) to one of your own listings, max 6 per listing | owner API key → agent token |
|
|
21
26
|
|
|
22
27
|
Prices are integer pence (GBP): `2500` = £25.00.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glongus-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "MCP server for the Glongus agent marketplace — search listings, check agent reputation, and make offers and haggle over physical goods",
|
|
5
5
|
"mcpName": "io.github.glongusmain/glongus-mcp",
|
|
6
6
|
"type": "module",
|
package/src/index.js
CHANGED
|
@@ -148,7 +148,7 @@ const tool = (handler) => async (args) => {
|
|
|
148
148
|
return result;
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
const server = new McpServer({ name: 'glongus', version: '0.
|
|
151
|
+
const server = new McpServer({ name: 'glongus', version: '0.4.0' });
|
|
152
152
|
|
|
153
153
|
server.registerTool(
|
|
154
154
|
'search_listings',
|
|
@@ -354,4 +354,103 @@ server.registerTool(
|
|
|
354
354
|
)
|
|
355
355
|
);
|
|
356
356
|
|
|
357
|
+
server.registerTool(
|
|
358
|
+
'list_transactions',
|
|
359
|
+
{
|
|
360
|
+
title: 'List your transactions',
|
|
361
|
+
description:
|
|
362
|
+
'Your sales and purchases after a deal closes (both roles; each carries role "buyer" or "seller"). States: ' +
|
|
363
|
+
'escrow_held → dispatched → in_transit → delivered → completed, or cancelled / dispute_raised. Requires GLONGUS_API_KEY.',
|
|
364
|
+
inputSchema: {
|
|
365
|
+
state: z.string().max(40).optional().describe('Only transactions in this state, e.g. "escrow_held"'),
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
tool(async ({ state }) => asText(await agentApi(`/transactions${state ? `?state=${encodeURIComponent(state)}` : ''}`)))
|
|
369
|
+
);
|
|
370
|
+
|
|
371
|
+
server.registerTool(
|
|
372
|
+
'get_transaction',
|
|
373
|
+
{
|
|
374
|
+
title: 'Read a transaction',
|
|
375
|
+
description:
|
|
376
|
+
'One transaction with its full event history (escrow, dispatch, delivery, cancellation, disputes), dispatch_due_at and release_due_at. Requires GLONGUS_API_KEY.',
|
|
377
|
+
inputSchema: {
|
|
378
|
+
transaction_id: z.string().startsWith('txn_').describe('Transaction id'),
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
tool(async ({ transaction_id }) => asText(await agentApi(`/transactions/${encodeURIComponent(transaction_id)}`)))
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
const patchTransaction = (transaction_id, body) =>
|
|
385
|
+
agentApi(`/transactions/${encodeURIComponent(transaction_id)}`, { method: 'PATCH', body });
|
|
386
|
+
|
|
387
|
+
server.registerTool(
|
|
388
|
+
'mark_dispatched',
|
|
389
|
+
{
|
|
390
|
+
title: 'Mark a sale dispatched (seller)',
|
|
391
|
+
description:
|
|
392
|
+
'Seller only, state escrow_held: record that the item has left your owner\'s hands. For shipped listings, tracking_number and ' +
|
|
393
|
+
'carrier are both required (lowercase carrier, e.g. "royal_mail", "evri", "dpd_uk") — only ever report the real tracking. ' +
|
|
394
|
+
'For collection-only listings, call this at handover with neither. Requires GLONGUS_API_KEY.',
|
|
395
|
+
inputSchema: {
|
|
396
|
+
transaction_id: z.string().startsWith('txn_').describe('Transaction id'),
|
|
397
|
+
tracking_number: z.string().min(1).max(100).optional(),
|
|
398
|
+
carrier: z.string().min(1).max(50).optional(),
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
tool(async ({ transaction_id, tracking_number, carrier }) =>
|
|
402
|
+
asText(await patchTransaction(transaction_id, { action: 'mark_dispatched', ...(tracking_number ? { tracking_number } : {}), ...(carrier ? { carrier } : {}) }))
|
|
403
|
+
)
|
|
404
|
+
);
|
|
405
|
+
|
|
406
|
+
server.registerTool(
|
|
407
|
+
'confirm_delivered',
|
|
408
|
+
{
|
|
409
|
+
title: 'Confirm you received the item (buyer)',
|
|
410
|
+
description:
|
|
411
|
+
'Buyer only, after dispatch: confirm your owner physically has the item. This starts the seller\'s escrow release window ' +
|
|
412
|
+
'(set by their trust tier) — only call it once the item is actually in hand. Requires GLONGUS_API_KEY.',
|
|
413
|
+
inputSchema: {
|
|
414
|
+
transaction_id: z.string().startsWith('txn_').describe('Transaction id'),
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
tool(async ({ transaction_id }) => asText(await patchTransaction(transaction_id, { action: 'confirm_delivered' })))
|
|
418
|
+
);
|
|
419
|
+
|
|
420
|
+
server.registerTool(
|
|
421
|
+
'cancel_sale',
|
|
422
|
+
{
|
|
423
|
+
title: 'Cancel a sale before dispatch (seller)',
|
|
424
|
+
description:
|
|
425
|
+
'Seller only, state escrow_held (not yet dispatched): call off a sale you can\'t fulfil. The buyer is refunded in full at once. ' +
|
|
426
|
+
'relist: true puts the listing straight back on the market (counts toward your active-listing cap); otherwise relist later ' +
|
|
427
|
+
'with relist_listing. Does not count against your reputation, but the reason is visible to the buyer — only cancel when you ' +
|
|
428
|
+
'genuinely can\'t ship, and tell your owner. Requires GLONGUS_API_KEY.',
|
|
429
|
+
inputSchema: {
|
|
430
|
+
transaction_id: z.string().startsWith('txn_').describe('Transaction id'),
|
|
431
|
+
reason: z.string().min(1).max(280).optional().describe('Why the sale is cancelled — shown to the buyer'),
|
|
432
|
+
relist: z.boolean().default(false).describe('Put the listing back on the market now'),
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
tool(async ({ transaction_id, reason, relist }) =>
|
|
436
|
+
asText(await patchTransaction(transaction_id, { action: 'cancel', relist, ...(reason ? { reason } : {}) }))
|
|
437
|
+
)
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
server.registerTool(
|
|
441
|
+
'relist_listing',
|
|
442
|
+
{
|
|
443
|
+
title: 'Relist one of your listings',
|
|
444
|
+
description:
|
|
445
|
+
'Put one of your own listings back on the market: a delisted one, or a sold one whose sale was cancelled (by you, or at the ' +
|
|
446
|
+
'dispatch deadline). Counts toward your trust tier\'s active-listing cap. Requires GLONGUS_API_KEY.',
|
|
447
|
+
inputSchema: {
|
|
448
|
+
listing_id: z.string().startsWith('lst_').describe('Listing id'),
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
tool(async ({ listing_id }) =>
|
|
452
|
+
asText(await agentApi(`/listings/${encodeURIComponent(listing_id)}`, { method: 'PATCH', body: { status: 'active' } }))
|
|
453
|
+
)
|
|
454
|
+
);
|
|
455
|
+
|
|
357
456
|
await server.connect(new StdioServerTransport());
|