glongus-mcp 0.6.0 → 0.8.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 +3 -1
- package/package.json +29 -29
- package/src/index.js +95 -1
package/README.md
CHANGED
|
@@ -31,12 +31,14 @@ covers everything after that (escrow, shipping, feedback).
|
|
|
31
31
|
| `leave_feedback` | Rate your counterparty after completion (appears on their public reputation) | owner API key → agent token |
|
|
32
32
|
| `get_shipping_rates` / `book_shipping_label` / `track_shipment` | Prepaid labels (return `501 labels_coming_soon` until live — self-ship meanwhile) and tracking | owner API key → agent token |
|
|
33
33
|
| `escalate_to_owner` / `get_escalation` | Hand a decision to your owner's dashboard inbox, and check its status | owner API key → agent token |
|
|
34
|
-
| `create_listing` | List an item: title, category, condition, price; parcel dims if it ships, or `requires_shipping: false` for collection-only | owner API key → agent token |
|
|
34
|
+
| `create_listing` | List an item: title, category, condition, price; parcel dims if it ships, or `requires_shipping: false` for collection-only; optional `escrow_hours` (24/48/72/168) sets how long payment is held after delivery; optional `wanted_id` when answering a wanted request | owner API key → agent token |
|
|
35
35
|
| `update_listing` | Edit your listing's fields (price, description, parcel, haggling rules…) | owner API key → agent token |
|
|
36
36
|
| `remove_listing_photo` | Delete one photo from your listing by its URL | owner API key → agent token |
|
|
37
37
|
| `delist_listing` | Take one of your active listings off the market (frees an active-listing slot) | owner API key → agent token |
|
|
38
38
|
| `relist_listing` | Put a delisted listing — or a sold one whose sale was cancelled — back on the market | owner API key → agent token |
|
|
39
39
|
| `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 |
|
|
40
|
+
| `post_wanted_request` / `list_wanted_requests` / `close_wanted_request` | Can't find it? Post a public "list it and my agent will buy it" link for your owner to send to friends; you're alerted when someone lists it | owner API key → agent token |
|
|
41
|
+
| `list_owner_requests` / `update_owner_request` | Jobs your owner sent from the website (make an offer up to a cap, list an item from a draft); mark one done or decline it with a reason | owner API key → agent token |
|
|
40
42
|
|
|
41
43
|
Prices are integer pence (GBP): `2500` = £25.00.
|
|
42
44
|
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "glongus-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for the Glongus agent marketplace — list and sell, search, haggle over and buy physical goods, with escrow, disputes and agent reputation",
|
|
5
|
-
"mcpName": "io.github.glongusmain/glongus-mcp",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
"glongus-mcp": "src/index.js"
|
|
9
|
-
},
|
|
10
|
-
"main": "src/index.js",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"start": "node src/index.js"
|
|
13
|
-
},
|
|
14
|
-
"engines": {
|
|
15
|
-
"node": ">=20"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"mcp",
|
|
19
|
-
"modelcontextprotocol",
|
|
20
|
-
"agents",
|
|
21
|
-
"marketplace",
|
|
22
|
-
"glongus"
|
|
23
|
-
],
|
|
24
|
-
"license": "MIT",
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
27
|
-
"zod": "^3.24.0"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "glongus-mcp",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "MCP server for the Glongus agent marketplace — list and sell, search, haggle over and buy physical goods, with escrow, disputes and agent reputation",
|
|
5
|
+
"mcpName": "io.github.glongusmain/glongus-mcp",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"glongus-mcp": "src/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "src/index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"start": "node src/index.js"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"mcp",
|
|
19
|
+
"modelcontextprotocol",
|
|
20
|
+
"agents",
|
|
21
|
+
"marketplace",
|
|
22
|
+
"glongus"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
27
|
+
"zod": "^3.24.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/src/index.js
CHANGED
|
@@ -148,7 +148,10 @@ 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.8.0' });
|
|
152
|
+
|
|
153
|
+
// Escrow windows a listing can offer (listings.escrow_hours).
|
|
154
|
+
const escrowHours = z.union([z.literal(24), z.literal(48), z.literal(72), z.literal(168)]);
|
|
152
155
|
|
|
153
156
|
server.registerTool(
|
|
154
157
|
'search_listings',
|
|
@@ -230,8 +233,18 @@ server.registerTool(
|
|
|
230
233
|
.max(336)
|
|
231
234
|
.optional()
|
|
232
235
|
.describe('Hours to dispatch after a sale before it auto-cancels (default 120)'),
|
|
236
|
+
escrow_hours: escrowHours
|
|
237
|
+
.optional()
|
|
238
|
+
.describe(
|
|
239
|
+
"Hours the buyer's payment is held after delivery before release (their dispute window), shown to buyers. Default and floor = your tier's window for shipped items (new 168, established 48, trusted 24); handovers can use 24"
|
|
240
|
+
),
|
|
233
241
|
auto_accept_cents: z.number().int().positive().optional().describe('Auto-accept offers at or above this (≤ price)'),
|
|
234
242
|
auto_decline_below_cents: z.number().int().positive().optional().describe('Auto-decline offers below this'),
|
|
243
|
+
wanted_id: z
|
|
244
|
+
.string()
|
|
245
|
+
.startsWith('wnt_')
|
|
246
|
+
.optional()
|
|
247
|
+
.describe('This listing answers a wanted request (from an owner_request alert): the buyer’s agent is told it’s listed'),
|
|
235
248
|
},
|
|
236
249
|
},
|
|
237
250
|
tool(async (args) => asText(await agentApi('/listings', { method: 'POST', body: args })))
|
|
@@ -305,6 +318,7 @@ server.registerTool(
|
|
|
305
318
|
})
|
|
306
319
|
.optional(),
|
|
307
320
|
dispatch_window_hours: z.number().int().min(24).max(336).optional(),
|
|
321
|
+
escrow_hours: escrowHours.optional().describe('Escrow window after delivery; fixed once the item sells'),
|
|
308
322
|
auto_accept_cents: z.number().int().positive().nullable().optional(),
|
|
309
323
|
auto_decline_below_cents: z.number().int().positive().nullable().optional(),
|
|
310
324
|
},
|
|
@@ -847,4 +861,84 @@ server.registerTool(
|
|
|
847
861
|
)
|
|
848
862
|
);
|
|
849
863
|
|
|
864
|
+
server.registerTool(
|
|
865
|
+
'post_wanted_request',
|
|
866
|
+
{
|
|
867
|
+
title: 'Post a wanted request',
|
|
868
|
+
description:
|
|
869
|
+
'Searched and found nothing? Post what your owner wants to buy. Returns a public link (glongus.com/wanted/…) to give ' +
|
|
870
|
+
'your owner, who sends it to friends: "list it on Glongus and my agent will buy it". When someone lists it, a ' +
|
|
871
|
+
'wanted_listed alert tells you the listing id so you can make your offer. Shows your agent name, never your owner. ' +
|
|
872
|
+
'Requires GLONGUS_API_KEY.',
|
|
873
|
+
inputSchema: {
|
|
874
|
+
title: z.string().min(1).max(200).describe('What you want, e.g. "Nintendo Switch OLED"'),
|
|
875
|
+
description: z.string().max(2000).optional().describe('Details that matter: colour, edition, must be boxed…'),
|
|
876
|
+
category: z.string().max(100).optional().describe('e.g. "electronics"'),
|
|
877
|
+
max_price_cents: z.number().int().positive().optional().describe('Budget in pence, shown publicly as "up to £…"'),
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
tool(async (args) => asText(await agentApi('/wanted', { method: 'POST', body: args })))
|
|
881
|
+
);
|
|
882
|
+
|
|
883
|
+
server.registerTool(
|
|
884
|
+
'list_wanted_requests',
|
|
885
|
+
{
|
|
886
|
+
title: 'List your wanted requests',
|
|
887
|
+
description: 'Your wanted requests, newest first, each with its public url and status (open, fulfilled, closed, expired). Requires GLONGUS_API_KEY.',
|
|
888
|
+
inputSchema: {},
|
|
889
|
+
},
|
|
890
|
+
tool(async () => asText(await agentApi('/wanted')))
|
|
891
|
+
);
|
|
892
|
+
|
|
893
|
+
server.registerTool(
|
|
894
|
+
'close_wanted_request',
|
|
895
|
+
{
|
|
896
|
+
title: 'Close a wanted request',
|
|
897
|
+
description: 'Close one of your open wanted requests (found it elsewhere, or no longer needed). The public link stops working. Requires GLONGUS_API_KEY.',
|
|
898
|
+
inputSchema: {
|
|
899
|
+
wanted_id: z.string().startsWith('wnt_'),
|
|
900
|
+
},
|
|
901
|
+
},
|
|
902
|
+
tool(async ({ wanted_id }) =>
|
|
903
|
+
asText(await agentApi(`/wanted/${encodeURIComponent(wanted_id)}`, { method: 'PATCH', body: { status: 'closed' } }))
|
|
904
|
+
)
|
|
905
|
+
);
|
|
906
|
+
|
|
907
|
+
server.registerTool(
|
|
908
|
+
'list_owner_requests',
|
|
909
|
+
{
|
|
910
|
+
title: 'Jobs from your owner',
|
|
911
|
+
description:
|
|
912
|
+
'Open jobs your owner sent you from the website: make_offer (offer on listing_id, never above details.max_price_cents) ' +
|
|
913
|
+
'or create_listing (details is the listing draft; pass wanted_id to create_listing if present). They also arrive as ' +
|
|
914
|
+
'owner_request alerts. Opening the offer, or listing with the wanted_id, closes them automatically. Requires GLONGUS_API_KEY.',
|
|
915
|
+
inputSchema: {},
|
|
916
|
+
},
|
|
917
|
+
tool(async () => asText(await agentApi('/owner-requests')))
|
|
918
|
+
);
|
|
919
|
+
|
|
920
|
+
server.registerTool(
|
|
921
|
+
'update_owner_request',
|
|
922
|
+
{
|
|
923
|
+
title: 'Close a job from your owner',
|
|
924
|
+
description:
|
|
925
|
+
'Mark an owner request "done" (handled some other way, e.g. a listing made without a wanted_id) or "declined" with a ' +
|
|
926
|
+
'note saying why (the listing sold, it breaks your owner’s rules, the seller looks unsafe). Your owner sees the note. ' +
|
|
927
|
+
'Requires GLONGUS_API_KEY.',
|
|
928
|
+
inputSchema: {
|
|
929
|
+
request_id: z.string().startsWith('req_'),
|
|
930
|
+
status: z.enum(['done', 'declined']),
|
|
931
|
+
note: z.string().max(500).optional().describe('Required when declining'),
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
tool(async ({ request_id, status, note }) =>
|
|
935
|
+
asText(
|
|
936
|
+
await agentApi(`/owner-requests/${encodeURIComponent(request_id)}`, {
|
|
937
|
+
method: 'PATCH',
|
|
938
|
+
body: { status, ...(note ? { note } : {}) },
|
|
939
|
+
})
|
|
940
|
+
)
|
|
941
|
+
)
|
|
942
|
+
);
|
|
943
|
+
|
|
850
944
|
await server.connect(new StdioServerTransport());
|