@unclick/mcp-server 0.2.5 → 0.3.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 +139 -139
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +261 -0
- package/dist/catalog.js.map +1 -1
- package/dist/keychain-secure-input.js +42 -42
- package/dist/linear-tool.js +73 -73
- package/dist/memory/db.d.ts +10 -0
- package/dist/memory/db.d.ts.map +1 -0
- package/dist/memory/db.js +22 -0
- package/dist/memory/db.js.map +1 -0
- package/dist/memory/handlers.d.ts +11 -0
- package/dist/memory/handlers.d.ts.map +1 -0
- package/dist/memory/handlers.js +125 -0
- package/dist/memory/handlers.js.map +1 -0
- package/dist/memory/local.d.ts +37 -0
- package/dist/memory/local.d.ts.map +1 -0
- package/dist/memory/local.js +386 -0
- package/dist/memory/local.js.map +1 -0
- package/dist/memory/supabase.d.ts +34 -0
- package/dist/memory/supabase.d.ts.map +1 -0
- package/dist/memory/supabase.js +209 -0
- package/dist/memory/supabase.js.map +1 -0
- package/dist/memory/types.d.ts +81 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +5 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/monday-tool.js +46 -46
- package/dist/musicbrainz-tool.js +1 -1
- package/dist/musicbrainz-tool.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +119 -0
- package/dist/server.js.map +1 -1
- package/dist/toilets-tool.js +2 -2
- package/package.json +66 -65
- package/public/icon.svg +15 -15
- package/server.json +37 -37
package/README.md
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
# @unclick/mcp-server
|
|
2
|
-
|
|
3
|
-
**MCP server for the [UnClick](https://unclick.world) tool marketplace.**
|
|
4
|
-
|
|
5
|
-
Lets any MCP-compatible AI agent (Claude, Cursor, etc.) discover and use every tool in the UnClick marketplace — URL shortening, QR codes, image processing, hashing, CSV/JSON, regex, cron, color utilities, key-value storage, and more.
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
### Claude Desktop
|
|
10
|
-
|
|
11
|
-
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
12
|
-
|
|
13
|
-
```json
|
|
14
|
-
{
|
|
15
|
-
"mcpServers": {
|
|
16
|
-
"unclick": {
|
|
17
|
-
"command": "npx",
|
|
18
|
-
"args": ["-y", "@unclick/mcp-server"],
|
|
19
|
-
"env": {
|
|
20
|
-
"UNCLICK_API_KEY": "your_api_key_here"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Get your API key at [unclick.world](https://unclick.world).
|
|
28
|
-
|
|
29
|
-
### Local / Development
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
UNCLICK_API_KEY=unck_... npx @unclick/mcp-server
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Configuration
|
|
36
|
-
|
|
37
|
-
| Environment Variable | Default | Description |
|
|
38
|
-
|---|---|---|
|
|
39
|
-
| `UNCLICK_API_KEY` | *(required)* | Your UnClick API key |
|
|
40
|
-
| `UNCLICK_BASE_URL` | `https://api.unclick.world` | Override API base URL (for self-hosted) |
|
|
41
|
-
|
|
42
|
-
## Tools Exposed
|
|
43
|
-
|
|
44
|
-
### Discovery (Meta Tools)
|
|
45
|
-
|
|
46
|
-
These tools let agents explore the full marketplace dynamically.
|
|
47
|
-
|
|
48
|
-
| Tool | Description |
|
|
49
|
-
|---|---|
|
|
50
|
-
| `unclick_search` | Search for tools by keyword. "I need to resize an image" → returns the image tool with endpoints and schemas. |
|
|
51
|
-
| `unclick_browse` | Browse all tools, optionally filtered by category (text, data, media, time, network, generation, storage). |
|
|
52
|
-
| `unclick_tool_info` | Get full details on a specific tool: all endpoints, required params, and response shapes. |
|
|
53
|
-
| `unclick_call` | Universal caller — specify any `endpoint_id` and `params`, the server routes the call. |
|
|
54
|
-
|
|
55
|
-
**Discovery flow for an agent:**
|
|
56
|
-
1. `unclick_search` → "what tool handles X?"
|
|
57
|
-
2. `unclick_tool_info` → "what are the exact params for that tool?"
|
|
58
|
-
3. `unclick_call` → call it
|
|
59
|
-
|
|
60
|
-
### Direct Tools (Zero Friction)
|
|
61
|
-
|
|
62
|
-
The most-used tools are exposed as first-class MCP tools for immediate use without discovery:
|
|
63
|
-
|
|
64
|
-
| Tool | What it does |
|
|
65
|
-
|---|---|
|
|
66
|
-
| `unclick_shorten_url` | Shorten a URL |
|
|
67
|
-
| `unclick_generate_qr` | Generate a QR code (PNG/SVG) |
|
|
68
|
-
| `unclick_hash` | Hash text with MD5/SHA1/SHA256/SHA512 |
|
|
69
|
-
| `unclick_transform_text` | Change text case (camel, snake, kebab, title, etc.) |
|
|
70
|
-
| `unclick_validate_email` | Validate an email address |
|
|
71
|
-
| `unclick_validate_url` | Validate a URL (+ optional reachability check) |
|
|
72
|
-
| `unclick_resize_image` | Resize a base64-encoded image |
|
|
73
|
-
| `unclick_parse_csv` | Parse CSV to JSON |
|
|
74
|
-
| `unclick_json_format` | Pretty-print JSON |
|
|
75
|
-
| `unclick_encode` | Encode/decode base64, URL, HTML, or hex |
|
|
76
|
-
| `unclick_generate_uuid` | Generate UUIDs |
|
|
77
|
-
| `unclick_random_password` | Generate a secure password |
|
|
78
|
-
| `unclick_cron_parse` | Parse a cron expression + show next occurrences |
|
|
79
|
-
| `unclick_ip_parse` | Parse an IP address |
|
|
80
|
-
| `unclick_color_convert` | Convert color between hex/RGB/HSL/HSV |
|
|
81
|
-
| `unclick_regex_test` | Test a regex and get all matches |
|
|
82
|
-
| `unclick_timestamp_convert` | Convert timestamps between formats |
|
|
83
|
-
| `unclick_diff_text` | Line-by-line diff of two strings |
|
|
84
|
-
| `unclick_kv_set` | Store a value in the key-value store |
|
|
85
|
-
| `unclick_kv_get` | Retrieve a value from the key-value store |
|
|
86
|
-
|
|
87
|
-
## Full Tool Catalog
|
|
88
|
-
|
|
89
|
-
The marketplace currently includes 23 tool groups spanning:
|
|
90
|
-
|
|
91
|
-
- **Text** — transform (case, slug, count), encode/decode (base64, URL, HTML, hex), hash/HMAC, regex, markdown, diff
|
|
92
|
-
- **Data** — JSON utilities, CSV processing, input validation (email, URL, phone, credit card, IP, color)
|
|
93
|
-
- **Media** — image processing (resize, convert, crop, rotate, compress, grayscale), QR code generation, color utilities
|
|
94
|
-
- **Time** — timestamp conversion, cron parsing/building
|
|
95
|
-
- **Network** — URL shortening, IP utilities (parse, subnet, CIDR)
|
|
96
|
-
- **Generation** — UUID v4, random (numbers, strings, passwords, picks, shuffles, colors)
|
|
97
|
-
- **Storage** — key-value store (with TTL), webhook bins
|
|
98
|
-
|
|
99
|
-
All tools are accessible via `unclick_call` with the appropriate `endpoint_id`.
|
|
100
|
-
|
|
101
|
-
## Example Usage
|
|
102
|
-
|
|
103
|
-
**Agent discovers and uses a tool:**
|
|
104
|
-
```
|
|
105
|
-
Agent: I need to hash a password before storing it.
|
|
106
|
-
|
|
107
|
-
1. unclick_search({ query: "hash password" })
|
|
108
|
-
→ Returns: hash tool (slug: hash, endpoints: hash.compute, hash.verify, hash.hmac)
|
|
109
|
-
|
|
110
|
-
2. unclick_call({ endpoint_id: "hash.compute", params: { text: "my-secret", algorithm: "sha256" } })
|
|
111
|
-
→ { algorithm: "sha256", hash: "abc123...", length: 64 }
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**Direct tool usage:**
|
|
115
|
-
```
|
|
116
|
-
Agent: unclick_generate_qr({ text: "https://example.com", format: "png", size: 400 })
|
|
117
|
-
→ { binary: true, content_type: "image/png", data: "<base64>" }
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Development
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Run locally with tsx (no build step)
|
|
124
|
-
UNCLICK_API_KEY=unck_... npm run dev
|
|
125
|
-
|
|
126
|
-
# Build
|
|
127
|
-
npm run build
|
|
128
|
-
|
|
129
|
-
# Run built output
|
|
130
|
-
npm start
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## MCP Registry
|
|
134
|
-
|
|
135
|
-
This server is published to npm as `@unclick/mcp-server` and can be added to any MCP registry that supports npx-based servers.
|
|
136
|
-
|
|
137
|
-
## License
|
|
138
|
-
|
|
139
|
-
MIT
|
|
1
|
+
# @unclick/mcp-server
|
|
2
|
+
|
|
3
|
+
**MCP server for the [UnClick](https://unclick.world) tool marketplace.**
|
|
4
|
+
|
|
5
|
+
Lets any MCP-compatible AI agent (Claude, Cursor, etc.) discover and use every tool in the UnClick marketplace — URL shortening, QR codes, image processing, hashing, CSV/JSON, regex, cron, color utilities, key-value storage, and more.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Claude Desktop
|
|
10
|
+
|
|
11
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"unclick": {
|
|
17
|
+
"command": "npx",
|
|
18
|
+
"args": ["-y", "@unclick/mcp-server"],
|
|
19
|
+
"env": {
|
|
20
|
+
"UNCLICK_API_KEY": "your_api_key_here"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Get your API key at [unclick.world](https://unclick.world).
|
|
28
|
+
|
|
29
|
+
### Local / Development
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
UNCLICK_API_KEY=unck_... npx @unclick/mcp-server
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
| Environment Variable | Default | Description |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `UNCLICK_API_KEY` | *(required)* | Your UnClick API key |
|
|
40
|
+
| `UNCLICK_BASE_URL` | `https://api.unclick.world` | Override API base URL (for self-hosted) |
|
|
41
|
+
|
|
42
|
+
## Tools Exposed
|
|
43
|
+
|
|
44
|
+
### Discovery (Meta Tools)
|
|
45
|
+
|
|
46
|
+
These tools let agents explore the full marketplace dynamically.
|
|
47
|
+
|
|
48
|
+
| Tool | Description |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `unclick_search` | Search for tools by keyword. "I need to resize an image" → returns the image tool with endpoints and schemas. |
|
|
51
|
+
| `unclick_browse` | Browse all tools, optionally filtered by category (text, data, media, time, network, generation, storage). |
|
|
52
|
+
| `unclick_tool_info` | Get full details on a specific tool: all endpoints, required params, and response shapes. |
|
|
53
|
+
| `unclick_call` | Universal caller — specify any `endpoint_id` and `params`, the server routes the call. |
|
|
54
|
+
|
|
55
|
+
**Discovery flow for an agent:**
|
|
56
|
+
1. `unclick_search` → "what tool handles X?"
|
|
57
|
+
2. `unclick_tool_info` → "what are the exact params for that tool?"
|
|
58
|
+
3. `unclick_call` → call it
|
|
59
|
+
|
|
60
|
+
### Direct Tools (Zero Friction)
|
|
61
|
+
|
|
62
|
+
The most-used tools are exposed as first-class MCP tools for immediate use without discovery:
|
|
63
|
+
|
|
64
|
+
| Tool | What it does |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `unclick_shorten_url` | Shorten a URL |
|
|
67
|
+
| `unclick_generate_qr` | Generate a QR code (PNG/SVG) |
|
|
68
|
+
| `unclick_hash` | Hash text with MD5/SHA1/SHA256/SHA512 |
|
|
69
|
+
| `unclick_transform_text` | Change text case (camel, snake, kebab, title, etc.) |
|
|
70
|
+
| `unclick_validate_email` | Validate an email address |
|
|
71
|
+
| `unclick_validate_url` | Validate a URL (+ optional reachability check) |
|
|
72
|
+
| `unclick_resize_image` | Resize a base64-encoded image |
|
|
73
|
+
| `unclick_parse_csv` | Parse CSV to JSON |
|
|
74
|
+
| `unclick_json_format` | Pretty-print JSON |
|
|
75
|
+
| `unclick_encode` | Encode/decode base64, URL, HTML, or hex |
|
|
76
|
+
| `unclick_generate_uuid` | Generate UUIDs |
|
|
77
|
+
| `unclick_random_password` | Generate a secure password |
|
|
78
|
+
| `unclick_cron_parse` | Parse a cron expression + show next occurrences |
|
|
79
|
+
| `unclick_ip_parse` | Parse an IP address |
|
|
80
|
+
| `unclick_color_convert` | Convert color between hex/RGB/HSL/HSV |
|
|
81
|
+
| `unclick_regex_test` | Test a regex and get all matches |
|
|
82
|
+
| `unclick_timestamp_convert` | Convert timestamps between formats |
|
|
83
|
+
| `unclick_diff_text` | Line-by-line diff of two strings |
|
|
84
|
+
| `unclick_kv_set` | Store a value in the key-value store |
|
|
85
|
+
| `unclick_kv_get` | Retrieve a value from the key-value store |
|
|
86
|
+
|
|
87
|
+
## Full Tool Catalog
|
|
88
|
+
|
|
89
|
+
The marketplace currently includes 23 tool groups spanning:
|
|
90
|
+
|
|
91
|
+
- **Text** — transform (case, slug, count), encode/decode (base64, URL, HTML, hex), hash/HMAC, regex, markdown, diff
|
|
92
|
+
- **Data** — JSON utilities, CSV processing, input validation (email, URL, phone, credit card, IP, color)
|
|
93
|
+
- **Media** — image processing (resize, convert, crop, rotate, compress, grayscale), QR code generation, color utilities
|
|
94
|
+
- **Time** — timestamp conversion, cron parsing/building
|
|
95
|
+
- **Network** — URL shortening, IP utilities (parse, subnet, CIDR)
|
|
96
|
+
- **Generation** — UUID v4, random (numbers, strings, passwords, picks, shuffles, colors)
|
|
97
|
+
- **Storage** — key-value store (with TTL), webhook bins
|
|
98
|
+
|
|
99
|
+
All tools are accessible via `unclick_call` with the appropriate `endpoint_id`.
|
|
100
|
+
|
|
101
|
+
## Example Usage
|
|
102
|
+
|
|
103
|
+
**Agent discovers and uses a tool:**
|
|
104
|
+
```
|
|
105
|
+
Agent: I need to hash a password before storing it.
|
|
106
|
+
|
|
107
|
+
1. unclick_search({ query: "hash password" })
|
|
108
|
+
→ Returns: hash tool (slug: hash, endpoints: hash.compute, hash.verify, hash.hmac)
|
|
109
|
+
|
|
110
|
+
2. unclick_call({ endpoint_id: "hash.compute", params: { text: "my-secret", algorithm: "sha256" } })
|
|
111
|
+
→ { algorithm: "sha256", hash: "abc123...", length: 64 }
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Direct tool usage:**
|
|
115
|
+
```
|
|
116
|
+
Agent: unclick_generate_qr({ text: "https://example.com", format: "png", size: 400 })
|
|
117
|
+
→ { binary: true, content_type: "image/png", data: "<base64>" }
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Development
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Run locally with tsx (no build step)
|
|
124
|
+
UNCLICK_API_KEY=unck_... npm run dev
|
|
125
|
+
|
|
126
|
+
# Build
|
|
127
|
+
npm run build
|
|
128
|
+
|
|
129
|
+
# Run built output
|
|
130
|
+
npm start
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## MCP Registry
|
|
134
|
+
|
|
135
|
+
This server is published to npm as `@unclick/mcp-server` and can be added to any MCP registry that supports npx-based servers.
|
|
136
|
+
|
|
137
|
+
## License
|
|
138
|
+
|
|
139
|
+
MIT
|
package/dist/catalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,UAAU,4FASb,CAAC;AAEX,eAAO,MAAM,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,UAAU,4FASb,CAAC;AAEX,eAAO,MAAM,OAAO,EAAE,OAAO,EAulE5B,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,YAAY;UAA2B,OAAO;cAAY,WAAW;EAAK,CAAC;AAOxF,iCAAiC;AACjC,eAAO,MAAM,QAAQ,sBAEpB,CAAC"}
|
package/dist/catalog.js
CHANGED
|
@@ -1852,6 +1852,267 @@ export const CATALOG = [
|
|
|
1852
1852
|
},
|
|
1853
1853
|
],
|
|
1854
1854
|
},
|
|
1855
|
+
// ─── MEMORY (persistent cross-session memory) ────────────────────────
|
|
1856
|
+
// Handled by the local memory module — no HTTP call is made. The 5 most
|
|
1857
|
+
// important tools (get_startup_context, write_session_summary, add_fact,
|
|
1858
|
+
// search_memory, set_business_context) are also registered as direct
|
|
1859
|
+
// MCP tools so agents discover the session protocol.
|
|
1860
|
+
{
|
|
1861
|
+
slug: "memory",
|
|
1862
|
+
name: "UnClick Memory",
|
|
1863
|
+
description: "Persistent cross-session memory for AI agents. 6-layer architecture: business context, knowledge library, session summaries, extracted facts, conversation log, code dumps. Zero-config local mode or Supabase cloud sync.",
|
|
1864
|
+
category: "storage",
|
|
1865
|
+
scope: "memory:use",
|
|
1866
|
+
endpoints: [
|
|
1867
|
+
{
|
|
1868
|
+
id: "memory.get_startup_context",
|
|
1869
|
+
name: "Get Startup Context",
|
|
1870
|
+
description: "Load business context, recent sessions, and hot facts. Call FIRST in every new session.",
|
|
1871
|
+
method: "POST",
|
|
1872
|
+
path: "/v1/memory/startup",
|
|
1873
|
+
requiresAuth: false,
|
|
1874
|
+
inputSchema: {
|
|
1875
|
+
type: "object",
|
|
1876
|
+
properties: { num_sessions: { type: "number", minimum: 1, maximum: 20, default: 5 } },
|
|
1877
|
+
},
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
id: "memory.search_memory",
|
|
1881
|
+
name: "Search Memory",
|
|
1882
|
+
description: "Full-text search across conversation logs.",
|
|
1883
|
+
method: "POST",
|
|
1884
|
+
path: "/v1/memory/search",
|
|
1885
|
+
requiresAuth: false,
|
|
1886
|
+
inputSchema: {
|
|
1887
|
+
type: "object",
|
|
1888
|
+
properties: {
|
|
1889
|
+
query: { type: "string" },
|
|
1890
|
+
max_results: { type: "number", minimum: 1, maximum: 50, default: 10 },
|
|
1891
|
+
},
|
|
1892
|
+
required: ["query"],
|
|
1893
|
+
},
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
id: "memory.search_facts",
|
|
1897
|
+
name: "Search Facts",
|
|
1898
|
+
description: "Search active (non-superseded) extracted facts.",
|
|
1899
|
+
method: "POST",
|
|
1900
|
+
path: "/v1/memory/facts/search",
|
|
1901
|
+
requiresAuth: false,
|
|
1902
|
+
inputSchema: {
|
|
1903
|
+
type: "object",
|
|
1904
|
+
properties: { query: { type: "string" } },
|
|
1905
|
+
required: ["query"],
|
|
1906
|
+
},
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
id: "memory.search_library",
|
|
1910
|
+
name: "Search Library",
|
|
1911
|
+
description: "Search versioned reference documents in the Knowledge Library.",
|
|
1912
|
+
method: "POST",
|
|
1913
|
+
path: "/v1/memory/library/search",
|
|
1914
|
+
requiresAuth: false,
|
|
1915
|
+
inputSchema: {
|
|
1916
|
+
type: "object",
|
|
1917
|
+
properties: { query: { type: "string" } },
|
|
1918
|
+
required: ["query"],
|
|
1919
|
+
},
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
id: "memory.get_library_doc",
|
|
1923
|
+
name: "Get Library Doc",
|
|
1924
|
+
description: "Get the full content of a library doc by slug.",
|
|
1925
|
+
method: "POST",
|
|
1926
|
+
path: "/v1/memory/library/get",
|
|
1927
|
+
requiresAuth: false,
|
|
1928
|
+
inputSchema: {
|
|
1929
|
+
type: "object",
|
|
1930
|
+
properties: { slug: { type: "string" } },
|
|
1931
|
+
required: ["slug"],
|
|
1932
|
+
},
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "memory.list_library",
|
|
1936
|
+
name: "List Library",
|
|
1937
|
+
description: "List all documents in the Knowledge Library.",
|
|
1938
|
+
method: "POST",
|
|
1939
|
+
path: "/v1/memory/library/list",
|
|
1940
|
+
requiresAuth: false,
|
|
1941
|
+
inputSchema: { type: "object", properties: {} },
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
id: "memory.write_session_summary",
|
|
1945
|
+
name: "Write Session Summary",
|
|
1946
|
+
description: "Save an end-of-session summary. Call BEFORE session ends.",
|
|
1947
|
+
method: "POST",
|
|
1948
|
+
path: "/v1/memory/session/write",
|
|
1949
|
+
requiresAuth: false,
|
|
1950
|
+
inputSchema: {
|
|
1951
|
+
type: "object",
|
|
1952
|
+
properties: {
|
|
1953
|
+
session_id: { type: "string" },
|
|
1954
|
+
summary: { type: "string" },
|
|
1955
|
+
topics: { type: "array", items: { type: "string" } },
|
|
1956
|
+
open_loops: { type: "array", items: { type: "string" } },
|
|
1957
|
+
decisions: { type: "array", items: { type: "string" } },
|
|
1958
|
+
platform: { type: "string", default: "claude-code" },
|
|
1959
|
+
duration_minutes: { type: "number" },
|
|
1960
|
+
},
|
|
1961
|
+
required: ["session_id", "summary"],
|
|
1962
|
+
},
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
id: "memory.add_fact",
|
|
1966
|
+
name: "Add Fact",
|
|
1967
|
+
description: "Add an atomic fact. One fact = one statement.",
|
|
1968
|
+
method: "POST",
|
|
1969
|
+
path: "/v1/memory/facts/add",
|
|
1970
|
+
requiresAuth: false,
|
|
1971
|
+
inputSchema: {
|
|
1972
|
+
type: "object",
|
|
1973
|
+
properties: {
|
|
1974
|
+
fact: { type: "string" },
|
|
1975
|
+
category: { type: "string", default: "general" },
|
|
1976
|
+
confidence: { type: "number", minimum: 0, maximum: 1, default: 0.9 },
|
|
1977
|
+
source_session_id: { type: "string" },
|
|
1978
|
+
},
|
|
1979
|
+
required: ["fact"],
|
|
1980
|
+
},
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
id: "memory.supersede_fact",
|
|
1984
|
+
name: "Supersede Fact",
|
|
1985
|
+
description: "Replace an outdated fact with a new version (old one marked superseded, never deleted).",
|
|
1986
|
+
method: "POST",
|
|
1987
|
+
path: "/v1/memory/facts/supersede",
|
|
1988
|
+
requiresAuth: false,
|
|
1989
|
+
inputSchema: {
|
|
1990
|
+
type: "object",
|
|
1991
|
+
properties: {
|
|
1992
|
+
old_fact_id: { type: "string" },
|
|
1993
|
+
new_fact_text: { type: "string" },
|
|
1994
|
+
new_category: { type: "string" },
|
|
1995
|
+
new_confidence: { type: "number", minimum: 0, maximum: 1 },
|
|
1996
|
+
},
|
|
1997
|
+
required: ["old_fact_id", "new_fact_text"],
|
|
1998
|
+
},
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
id: "memory.log_conversation",
|
|
2002
|
+
name: "Log Conversation",
|
|
2003
|
+
description: "Log a conversation exchange for later search.",
|
|
2004
|
+
method: "POST",
|
|
2005
|
+
path: "/v1/memory/conversation/log",
|
|
2006
|
+
requiresAuth: false,
|
|
2007
|
+
inputSchema: {
|
|
2008
|
+
type: "object",
|
|
2009
|
+
properties: {
|
|
2010
|
+
session_id: { type: "string" },
|
|
2011
|
+
role: { type: "string", enum: ["user", "assistant", "system", "tool"] },
|
|
2012
|
+
content: { type: "string" },
|
|
2013
|
+
has_code: { type: "boolean", default: false },
|
|
2014
|
+
},
|
|
2015
|
+
required: ["session_id", "role", "content"],
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
id: "memory.get_conversation_detail",
|
|
2020
|
+
name: "Get Conversation Detail",
|
|
2021
|
+
description: "Retrieve the full conversation log for a session.",
|
|
2022
|
+
method: "POST",
|
|
2023
|
+
path: "/v1/memory/conversation/get",
|
|
2024
|
+
requiresAuth: false,
|
|
2025
|
+
inputSchema: {
|
|
2026
|
+
type: "object",
|
|
2027
|
+
properties: { session_id: { type: "string" } },
|
|
2028
|
+
required: ["session_id"],
|
|
2029
|
+
},
|
|
2030
|
+
},
|
|
2031
|
+
{
|
|
2032
|
+
id: "memory.store_code",
|
|
2033
|
+
name: "Store Code",
|
|
2034
|
+
description: "Store a code block in the code dump layer.",
|
|
2035
|
+
method: "POST",
|
|
2036
|
+
path: "/v1/memory/code/store",
|
|
2037
|
+
requiresAuth: false,
|
|
2038
|
+
inputSchema: {
|
|
2039
|
+
type: "object",
|
|
2040
|
+
properties: {
|
|
2041
|
+
session_id: { type: "string" },
|
|
2042
|
+
language: { type: "string", default: "typescript" },
|
|
2043
|
+
filename: { type: "string" },
|
|
2044
|
+
code: { type: "string" },
|
|
2045
|
+
description: { type: "string" },
|
|
2046
|
+
},
|
|
2047
|
+
required: ["session_id", "code"],
|
|
2048
|
+
},
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
id: "memory.get_business_context",
|
|
2052
|
+
name: "Get Business Context",
|
|
2053
|
+
description: "Get all business context entries (standing rules).",
|
|
2054
|
+
method: "POST",
|
|
2055
|
+
path: "/v1/memory/context/get",
|
|
2056
|
+
requiresAuth: false,
|
|
2057
|
+
inputSchema: { type: "object", properties: {} },
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
id: "memory.set_business_context",
|
|
2061
|
+
name: "Set Business Context",
|
|
2062
|
+
description: "Add or update a business context entry (always loaded at session start).",
|
|
2063
|
+
method: "POST",
|
|
2064
|
+
path: "/v1/memory/context/set",
|
|
2065
|
+
requiresAuth: false,
|
|
2066
|
+
inputSchema: {
|
|
2067
|
+
type: "object",
|
|
2068
|
+
properties: {
|
|
2069
|
+
category: { type: "string" },
|
|
2070
|
+
key: { type: "string" },
|
|
2071
|
+
value: { type: "string" },
|
|
2072
|
+
priority: { type: "number" },
|
|
2073
|
+
},
|
|
2074
|
+
required: ["category", "key", "value"],
|
|
2075
|
+
},
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
id: "memory.upsert_library_doc",
|
|
2079
|
+
name: "Upsert Library Doc",
|
|
2080
|
+
description: "Create or update a Knowledge Library document (auto-versioned).",
|
|
2081
|
+
method: "POST",
|
|
2082
|
+
path: "/v1/memory/library/upsert",
|
|
2083
|
+
requiresAuth: false,
|
|
2084
|
+
inputSchema: {
|
|
2085
|
+
type: "object",
|
|
2086
|
+
properties: {
|
|
2087
|
+
slug: { type: "string" },
|
|
2088
|
+
title: { type: "string" },
|
|
2089
|
+
category: { type: "string", default: "reference" },
|
|
2090
|
+
content: { type: "string" },
|
|
2091
|
+
tags: { type: "array", items: { type: "string" } },
|
|
2092
|
+
},
|
|
2093
|
+
required: ["slug", "title", "content"],
|
|
2094
|
+
},
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
id: "memory.manage_decay",
|
|
2098
|
+
name: "Manage Decay",
|
|
2099
|
+
description: "Run the memory decay manager. Promotes/demotes items between hot/warm/cold tiers.",
|
|
2100
|
+
method: "POST",
|
|
2101
|
+
path: "/v1/memory/decay",
|
|
2102
|
+
requiresAuth: false,
|
|
2103
|
+
inputSchema: { type: "object", properties: {} },
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
id: "memory.memory_status",
|
|
2107
|
+
name: "Memory Status",
|
|
2108
|
+
description: "Get memory usage stats: storage mode, counts per layer, decay tier distribution.",
|
|
2109
|
+
method: "POST",
|
|
2110
|
+
path: "/v1/memory/status",
|
|
2111
|
+
requiresAuth: false,
|
|
2112
|
+
inputSchema: { type: "object", properties: {} },
|
|
2113
|
+
},
|
|
2114
|
+
],
|
|
2115
|
+
},
|
|
1855
2116
|
];
|
|
1856
2117
|
/** Flat map of all endpoints keyed by endpoint id */
|
|
1857
2118
|
export const ENDPOINT_MAP = new Map();
|