@efectoapp/mcp-server 0.1.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 +244 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/discovery.d.ts +21 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +141 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/images.d.ts +20 -0
- package/dist/tools/images.d.ts.map +1 -0
- package/dist/tools/images.js +143 -0
- package/dist/tools/images.js.map +1 -0
- package/dist/tools/output.d.ts +21 -0
- package/dist/tools/output.d.ts.map +1 -0
- package/dist/tools/output.js +287 -0
- package/dist/tools/output.js.map +1 -0
- package/dist/tools/state.d.ts +122 -0
- package/dist/tools/state.d.ts.map +1 -0
- package/dist/tools/state.js +943 -0
- package/dist/tools/state.js.map +1 -0
- package/package.json +58 -0
package/README.md
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
# Efecto MCP Server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for programmatic poster creation with [Efecto](https://efecto.app).
|
|
4
|
+
|
|
5
|
+
Create stunning visual designs with ASCII effects, glitch art, halftone patterns, and more—all from your CLI or AI agent.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
### Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Clone and build
|
|
13
|
+
git clone https://github.com/your-repo/efecto.git
|
|
14
|
+
cd efecto/mcp-server
|
|
15
|
+
pnpm install
|
|
16
|
+
pnpm build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Configure for Claude Code
|
|
20
|
+
|
|
21
|
+
Add to your Claude Code settings (`~/.claude/settings.json`):
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"efecto": {
|
|
27
|
+
"command": "node",
|
|
28
|
+
"args": ["/absolute/path/to/efecto/mcp-server/dist/index.js"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then restart Claude Code. You can verify it's working by asking Claude to list efecto tools.
|
|
35
|
+
|
|
36
|
+
## Example Workflow
|
|
37
|
+
|
|
38
|
+
> "Make a cyberpunk image that says DOPE for Instagram"
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. search_images({ query: "cyberpunk", orientation: "vertical" })
|
|
42
|
+
→ Returns images from Lummi
|
|
43
|
+
|
|
44
|
+
2. create_poster({ aspectRatio: "9:16" })
|
|
45
|
+
→ Creates Instagram story format
|
|
46
|
+
|
|
47
|
+
3. set_background({ type: "image", imageUrl: "<url from step 1>" })
|
|
48
|
+
→ Sets the cyberpunk image as background
|
|
49
|
+
|
|
50
|
+
4. apply_effect({ effectId: "glitch-digital" })
|
|
51
|
+
→ Applies digital glitch effect
|
|
52
|
+
|
|
53
|
+
5. add_postprocess({ type: "chromatic-aberration", strength: 0.02 })
|
|
54
|
+
→ Adds RGB split effect
|
|
55
|
+
|
|
56
|
+
6. add_postprocess({ type: "scanlines", intensity: 0.3 })
|
|
57
|
+
→ Adds CRT scanlines
|
|
58
|
+
|
|
59
|
+
7. add_layer({ type: "text", content: "DOPE", fontSize: 120, fontFamily: "Space Grotesk", color: "#ffffff" })
|
|
60
|
+
→ Adds the title text
|
|
61
|
+
|
|
62
|
+
8. generate_url()
|
|
63
|
+
→ Returns shareable URL like https://efecto.app/canvas?lm=1&...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Available Tools
|
|
67
|
+
|
|
68
|
+
### Discovery Tools
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `list_effects` | List all available main effects |
|
|
73
|
+
| `list_fonts` | List available fonts for text layers |
|
|
74
|
+
| `list_palettes` | List color palettes |
|
|
75
|
+
| `list_materials` | List 3D materials |
|
|
76
|
+
|
|
77
|
+
### Image Tools
|
|
78
|
+
|
|
79
|
+
#### `search_images`
|
|
80
|
+
|
|
81
|
+
Search for free stock images from Lummi.
|
|
82
|
+
|
|
83
|
+
| Parameter | Type | Description |
|
|
84
|
+
|-----------|------|-------------|
|
|
85
|
+
| `query` | string | Search query (e.g., "cyberpunk", "nature"). Empty = featured |
|
|
86
|
+
| `orientation` | string | `"vertical"` (9:16), `"horizontal"` (16:9), `"square"` (1:1) |
|
|
87
|
+
| `type` | string | `"photo"`, `"illustration"`, `"3d"` |
|
|
88
|
+
| `luminance` | string | `"dark"`, `"neutral"`, `"bright"` |
|
|
89
|
+
| `limit` | number | Max results (default: 10, max: 50) |
|
|
90
|
+
|
|
91
|
+
### State Building Tools
|
|
92
|
+
|
|
93
|
+
#### `create_poster`
|
|
94
|
+
|
|
95
|
+
Create a new poster.
|
|
96
|
+
|
|
97
|
+
| Parameter | Type | Default | Description |
|
|
98
|
+
|-----------|------|---------|-------------|
|
|
99
|
+
| `aspectRatio` | string | `"16:9"` | `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, `"full"` |
|
|
100
|
+
| `backgroundColor` | string | `"#1a1a1a"` | Background color (hex) |
|
|
101
|
+
|
|
102
|
+
#### `set_background`
|
|
103
|
+
|
|
104
|
+
Set the background layer (always at index 0).
|
|
105
|
+
|
|
106
|
+
| Parameter | Type | Description |
|
|
107
|
+
|-----------|------|-------------|
|
|
108
|
+
| `type` | string | `"solid"` or `"image"` |
|
|
109
|
+
| `color` | string | Hex color (for solid type) |
|
|
110
|
+
| `imageUrl` | string | Image URL (for image type) |
|
|
111
|
+
|
|
112
|
+
#### `add_layer`
|
|
113
|
+
|
|
114
|
+
Add a layer to the poster.
|
|
115
|
+
|
|
116
|
+
| Parameter | Type | Description |
|
|
117
|
+
|-----------|------|-------------|
|
|
118
|
+
| `type` | string | `"text"`, `"image"`, `"video"`, `"3d"` |
|
|
119
|
+
| `name` | string | Layer name |
|
|
120
|
+
|
|
121
|
+
**Text layer parameters:**
|
|
122
|
+
- `content`: Text content
|
|
123
|
+
- `fontFamily`: Font name (e.g., "Space Grotesk", "Inter")
|
|
124
|
+
- `fontSize`: Size in pixels
|
|
125
|
+
- `fontWeight`: `"normal"`, `"medium"`, `"semibold"`, `"bold"`
|
|
126
|
+
- `color`: Hex color
|
|
127
|
+
- `textAlign`: `"left"`, `"center"`, `"right"`
|
|
128
|
+
|
|
129
|
+
**Image/Video layer parameters:**
|
|
130
|
+
- `mediaUrl`: Media URL
|
|
131
|
+
- `objectFit`: `"cover"`, `"contain"`
|
|
132
|
+
|
|
133
|
+
**Transform parameters (all layers):**
|
|
134
|
+
- `x`, `y`: Position (-1 to 1, 0 = center)
|
|
135
|
+
- `width`, `height`: Size (0 to 1+, 1 = full canvas)
|
|
136
|
+
- `rotation`: Degrees
|
|
137
|
+
- `opacity`: 0-1
|
|
138
|
+
|
|
139
|
+
#### `modify_layer`
|
|
140
|
+
|
|
141
|
+
Modify an existing layer by ID.
|
|
142
|
+
|
|
143
|
+
#### `remove_layer`
|
|
144
|
+
|
|
145
|
+
Remove a layer by ID (cannot remove background).
|
|
146
|
+
|
|
147
|
+
#### `apply_effect`
|
|
148
|
+
|
|
149
|
+
Apply the main effect. Only one can be active.
|
|
150
|
+
|
|
151
|
+
| Parameter | Type | Description |
|
|
152
|
+
|-----------|------|-------------|
|
|
153
|
+
| `effectId` | string | Effect ID (see below) |
|
|
154
|
+
| `enabled` | boolean | Enable/disable (default: true) |
|
|
155
|
+
|
|
156
|
+
**Available Effect IDs:**
|
|
157
|
+
|
|
158
|
+
| Category | Effect IDs |
|
|
159
|
+
|----------|------------|
|
|
160
|
+
| ASCII | `ascii-standard`, `ascii-blocks`, `ascii-braille`, `ascii-hatching`, `ascii-matrix`, `ascii-technical`, `ascii-dense`, `ascii-minimal` |
|
|
161
|
+
| Dither | `dither-floyd-steinberg`, `dither-atkinson`, `dither-jarvis-judice-ninke`, `dither-stucki`, `dither-burkes`, `dither-sierra`, `dither-two-row-sierra`, `dither-sierra-lite` |
|
|
162
|
+
| Halftone | `halftone-mono`, `halftone-cmyk` |
|
|
163
|
+
| Glitch | `glitch-chromatic`, `glitch-digital`, `glitch-vhs`, `glitch-weird` |
|
|
164
|
+
| Art | `art-kuwahara`, `art-crosshatch`, `art-lineart`, `art-engraving`, `art-stipple` |
|
|
165
|
+
| Special | `special-warp` |
|
|
166
|
+
|
|
167
|
+
**Effect-specific parameters:**
|
|
168
|
+
- ASCII: `cellSize` (4-32), `color` (bool), `invert` (bool)
|
|
169
|
+
- Dither: `pixelation` (1-10), `colors` (array)
|
|
170
|
+
- Halftone: `dotSize`
|
|
171
|
+
- Glitch: `speed`
|
|
172
|
+
|
|
173
|
+
#### `add_postprocess`
|
|
174
|
+
|
|
175
|
+
Add a stackable post-processing effect.
|
|
176
|
+
|
|
177
|
+
| Parameter | Type | Description |
|
|
178
|
+
|-----------|------|-------------|
|
|
179
|
+
| `type` | string | Post-process type (see below) |
|
|
180
|
+
| `enabled` | boolean | Enable/disable |
|
|
181
|
+
|
|
182
|
+
**Post-process types:** `scanlines`, `vignette`, `chromatic-aberration`, `curvature`, `grain`, `noise`, `pixelate`, `wave`, `rgb-glitch`, `brightness-contrast`, `color-tint`, `palette`, `jitter`, `bloom`, `dot-screen`, `sepia`, `grid`, `light-beams`, `warp`, `motion-blur`
|
|
183
|
+
|
|
184
|
+
**Common parameters by type:**
|
|
185
|
+
- `scanlines`: `intensity`, `count`
|
|
186
|
+
- `vignette`: `intensity`, `radius`
|
|
187
|
+
- `chromatic-aberration`: `strength`, `angle`
|
|
188
|
+
- `grain`: `intensity`, `size`, `speed`
|
|
189
|
+
- `brightness-contrast`: `brightness`, `contrast`, `saturation`, `hue`
|
|
190
|
+
- `palette`: `colors` (array), `intensity`
|
|
191
|
+
|
|
192
|
+
#### `get_state`
|
|
193
|
+
|
|
194
|
+
Get the current poster state as JSON.
|
|
195
|
+
|
|
196
|
+
### Output Tools
|
|
197
|
+
|
|
198
|
+
#### `generate_url`
|
|
199
|
+
|
|
200
|
+
Generate a shareable URL for the current poster.
|
|
201
|
+
|
|
202
|
+
| Parameter | Type | Default | Description |
|
|
203
|
+
|-----------|------|---------|-------------|
|
|
204
|
+
| `baseUrl` | string | `"https://efecto.app"` | Base URL |
|
|
205
|
+
|
|
206
|
+
Returns a URL that opens in any browser with all effects applied.
|
|
207
|
+
|
|
208
|
+
#### `render_image`
|
|
209
|
+
|
|
210
|
+
Render the poster to an image (async).
|
|
211
|
+
|
|
212
|
+
| Parameter | Type | Default | Description |
|
|
213
|
+
|-----------|------|---------|-------------|
|
|
214
|
+
| `format` | string | `"png"` | `"png"`, `"jpeg"`, `"webp"` |
|
|
215
|
+
| `width` | number | auto | Output width |
|
|
216
|
+
| `height` | number | auto | Output height |
|
|
217
|
+
| `quality` | number | 90 | JPEG/WebP quality |
|
|
218
|
+
|
|
219
|
+
Returns a job ID for polling status.
|
|
220
|
+
|
|
221
|
+
## Development
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
pnpm install # Install dependencies
|
|
225
|
+
pnpm build # Build TypeScript
|
|
226
|
+
pnpm dev # Watch mode
|
|
227
|
+
pnpm start # Run server
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## API Endpoints
|
|
231
|
+
|
|
232
|
+
The MCP server calls these Efecto API endpoints:
|
|
233
|
+
|
|
234
|
+
| Endpoint | Method | Description |
|
|
235
|
+
|----------|--------|-------------|
|
|
236
|
+
| `/api/v1/images/search` | GET | Search Lummi images |
|
|
237
|
+
| `/api/v1/state/encode` | POST | Encode state to URL |
|
|
238
|
+
| `/api/v1/state/decode` | POST | Decode URL to state |
|
|
239
|
+
| `/api/v1/state/validate` | POST | Validate state |
|
|
240
|
+
| `/api/v1/render` | POST | Render to image |
|
|
241
|
+
|
|
242
|
+
## License
|
|
243
|
+
|
|
244
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Efecto MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Provides tools for programmatic poster creation via the Model Context Protocol.
|
|
6
|
+
*
|
|
7
|
+
* Tools:
|
|
8
|
+
* - list_effects: List available effects
|
|
9
|
+
* - list_fonts: List available fonts
|
|
10
|
+
* - list_palettes: List color palettes
|
|
11
|
+
* - list_materials: List 3D materials
|
|
12
|
+
* - search_images: Search for free stock images
|
|
13
|
+
* - create_poster: Create a new poster
|
|
14
|
+
* - set_background: Configure background layer
|
|
15
|
+
* - add_layer: Add a layer to the poster
|
|
16
|
+
* - modify_layer: Modify an existing layer
|
|
17
|
+
* - apply_effect: Apply main effect (ASCII, dither, etc.)
|
|
18
|
+
* - add_postprocess: Add post-processing effect
|
|
19
|
+
* - generate_url: Generate shareable URL
|
|
20
|
+
* - render_image: Render poster to image
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Efecto MCP Server
|
|
5
|
+
*
|
|
6
|
+
* Provides tools for programmatic poster creation via the Model Context Protocol.
|
|
7
|
+
*
|
|
8
|
+
* Tools:
|
|
9
|
+
* - list_effects: List available effects
|
|
10
|
+
* - list_fonts: List available fonts
|
|
11
|
+
* - list_palettes: List color palettes
|
|
12
|
+
* - list_materials: List 3D materials
|
|
13
|
+
* - search_images: Search for free stock images
|
|
14
|
+
* - create_poster: Create a new poster
|
|
15
|
+
* - set_background: Configure background layer
|
|
16
|
+
* - add_layer: Add a layer to the poster
|
|
17
|
+
* - modify_layer: Modify an existing layer
|
|
18
|
+
* - apply_effect: Apply main effect (ASCII, dither, etc.)
|
|
19
|
+
* - add_postprocess: Add post-processing effect
|
|
20
|
+
* - generate_url: Generate shareable URL
|
|
21
|
+
* - render_image: Render poster to image
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
|
|
25
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
26
|
+
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
27
|
+
const discovery_js_1 = require("./tools/discovery.js");
|
|
28
|
+
const state_js_1 = require("./tools/state.js");
|
|
29
|
+
const output_js_1 = require("./tools/output.js");
|
|
30
|
+
const images_js_1 = require("./tools/images.js");
|
|
31
|
+
// Combine all tools
|
|
32
|
+
const allTools = [...discovery_js_1.discoveryTools, ...images_js_1.imageTools, ...state_js_1.stateTools, ...output_js_1.outputTools];
|
|
33
|
+
// Create server instance
|
|
34
|
+
const server = new index_js_1.Server({
|
|
35
|
+
name: 'efecto-mcp',
|
|
36
|
+
version: '0.1.0',
|
|
37
|
+
}, {
|
|
38
|
+
capabilities: {
|
|
39
|
+
tools: {},
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
// Handle tool listing
|
|
43
|
+
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
44
|
+
return { tools: allTools };
|
|
45
|
+
});
|
|
46
|
+
// Handle tool calls
|
|
47
|
+
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
48
|
+
const { name, arguments: args } = request.params;
|
|
49
|
+
try {
|
|
50
|
+
// Discovery tools
|
|
51
|
+
if (discovery_js_1.discoveryTools.some(t => t.name === name)) {
|
|
52
|
+
return await (0, discovery_js_1.handleDiscoveryTool)(name, args);
|
|
53
|
+
}
|
|
54
|
+
// Image tools
|
|
55
|
+
if (images_js_1.imageTools.some(t => t.name === name)) {
|
|
56
|
+
return await (0, images_js_1.handleImageTool)(name, args);
|
|
57
|
+
}
|
|
58
|
+
// State tools
|
|
59
|
+
if (state_js_1.stateTools.some(t => t.name === name)) {
|
|
60
|
+
return await (0, state_js_1.handleStateTool)(name, args);
|
|
61
|
+
}
|
|
62
|
+
// Output tools
|
|
63
|
+
if (output_js_1.outputTools.some(t => t.name === name)) {
|
|
64
|
+
return await (0, output_js_1.handleOutputTool)(name, args);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
68
|
+
isError: true,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return {
|
|
73
|
+
content: [
|
|
74
|
+
{
|
|
75
|
+
type: 'text',
|
|
76
|
+
text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
isError: true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// Start the server
|
|
84
|
+
async function main() {
|
|
85
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
86
|
+
await server.connect(transport);
|
|
87
|
+
console.error('Efecto MCP server running on stdio');
|
|
88
|
+
}
|
|
89
|
+
main().catch((error) => {
|
|
90
|
+
console.error('Server error:', error);
|
|
91
|
+
process.exit(1);
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;GAmBG;;AAEH,wEAAkE;AAClE,wEAAgF;AAChF,iEAI2C;AAE3C,uDAA0E;AAC1E,+CAA0E;AAC1E,iDAAiE;AACjE,iDAA+D;AAE/D,oBAAoB;AACpB,MAAM,QAAQ,GAAW,CAAC,GAAG,6BAAc,EAAE,GAAG,sBA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AC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;YAC3C,OAAO,MAAM,IAAA,4BAAgB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3C,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,EAAE,CAAC;YAC1D,OAAO,EAAE,IAAI;SACd,CAAA;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE;iBAC3E;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAA;IACH,CAAC;AACH,CAAC,CAAC,CAAA;AAEF,mBAAmB;AACnB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery Tools
|
|
3
|
+
*
|
|
4
|
+
* Read-only tools for listing available options:
|
|
5
|
+
* - list_effects: List all available post-processing effects
|
|
6
|
+
* - list_fonts: List all available fonts
|
|
7
|
+
* - list_palettes: List all color palettes
|
|
8
|
+
* - list_materials: List all 3D materials
|
|
9
|
+
*/
|
|
10
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
11
|
+
export declare const discoveryTools: Tool[];
|
|
12
|
+
/**
|
|
13
|
+
* Handle discovery tool calls
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleDiscoveryTool(name: string, _args: Record<string, unknown> | undefined): Promise<{
|
|
16
|
+
content: Array<{
|
|
17
|
+
type: string;
|
|
18
|
+
text: string;
|
|
19
|
+
}>;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAG9D,eAAO,MAAM,cAAc,EAAE,IAAI,EAqChC,CAAA;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAwG7D"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Discovery Tools
|
|
4
|
+
*
|
|
5
|
+
* Read-only tools for listing available options:
|
|
6
|
+
* - list_effects: List all available post-processing effects
|
|
7
|
+
* - list_fonts: List all available fonts
|
|
8
|
+
* - list_palettes: List all color palettes
|
|
9
|
+
* - list_materials: List all 3D materials
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.discoveryTools = void 0;
|
|
13
|
+
exports.handleDiscoveryTool = handleDiscoveryTool;
|
|
14
|
+
// Tool definitions for discovery
|
|
15
|
+
exports.discoveryTools = [
|
|
16
|
+
{
|
|
17
|
+
name: 'list_effects',
|
|
18
|
+
description: 'List all available post-processing effects that can be applied to posters',
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {},
|
|
22
|
+
required: [],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'list_fonts',
|
|
27
|
+
description: 'List all available fonts for text layers',
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {},
|
|
31
|
+
required: [],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'list_palettes',
|
|
36
|
+
description: 'List all available color palettes',
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {},
|
|
40
|
+
required: [],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'list_materials',
|
|
45
|
+
description: 'List all available 3D materials for 3D layers',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {},
|
|
49
|
+
required: [],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Handle discovery tool calls
|
|
55
|
+
*/
|
|
56
|
+
async function handleDiscoveryTool(name, _args) {
|
|
57
|
+
switch (name) {
|
|
58
|
+
case 'list_effects':
|
|
59
|
+
return {
|
|
60
|
+
content: [
|
|
61
|
+
{
|
|
62
|
+
type: 'text',
|
|
63
|
+
text: JSON.stringify({
|
|
64
|
+
effects: [
|
|
65
|
+
{ id: 'ascii', name: 'ASCII', description: 'Convert to ASCII art characters' },
|
|
66
|
+
{ id: 'dither', name: 'Dither', description: 'Apply dithering patterns' },
|
|
67
|
+
{ id: 'halftone', name: 'Halftone', description: 'Apply halftone dot patterns' },
|
|
68
|
+
{ id: 'pixelate', name: 'Pixelate', description: 'Pixelate the image' },
|
|
69
|
+
{ id: 'noise', name: 'Noise', description: 'Add noise effects' },
|
|
70
|
+
{ id: 'glitch', name: 'Glitch', description: 'Apply glitch effects' },
|
|
71
|
+
{ id: 'rgbShift', name: 'RGB Shift', description: 'Shift RGB color channels' },
|
|
72
|
+
{ id: 'scanlines', name: 'Scanlines', description: 'Add CRT scanlines' },
|
|
73
|
+
{ id: 'vignette', name: 'Vignette', description: 'Add vignette effect' },
|
|
74
|
+
{ id: 'bloom', name: 'Bloom', description: 'Add glow/bloom effect' },
|
|
75
|
+
],
|
|
76
|
+
}, null, 2),
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
case 'list_fonts':
|
|
81
|
+
return {
|
|
82
|
+
content: [
|
|
83
|
+
{
|
|
84
|
+
type: 'text',
|
|
85
|
+
text: JSON.stringify({
|
|
86
|
+
fonts: [
|
|
87
|
+
{ id: 'inter', name: 'Inter', category: 'sans-serif' },
|
|
88
|
+
{ id: 'roboto', name: 'Roboto', category: 'sans-serif' },
|
|
89
|
+
{ id: 'roboto-mono', name: 'Roboto Mono', category: 'monospace' },
|
|
90
|
+
{ id: 'playfair', name: 'Playfair Display', category: 'serif' },
|
|
91
|
+
{ id: 'space-grotesk', name: 'Space Grotesk', category: 'sans-serif' },
|
|
92
|
+
{ id: 'geist', name: 'Geist', category: 'sans-serif' },
|
|
93
|
+
{ id: 'geist-mono', name: 'Geist Mono', category: 'monospace' },
|
|
94
|
+
],
|
|
95
|
+
}, null, 2),
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
case 'list_palettes':
|
|
100
|
+
return {
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: 'text',
|
|
104
|
+
text: JSON.stringify({
|
|
105
|
+
palettes: [
|
|
106
|
+
{ id: 'monochrome', name: 'Monochrome', colors: ['#000000', '#FFFFFF'] },
|
|
107
|
+
{ id: 'warm', name: 'Warm', colors: ['#FF6B6B', '#FFA500', '#FFD93D'] },
|
|
108
|
+
{ id: 'cool', name: 'Cool', colors: ['#4ECDC4', '#45B7D1', '#96CEB4'] },
|
|
109
|
+
{ id: 'neon', name: 'Neon', colors: ['#FF00FF', '#00FFFF', '#FFFF00'] },
|
|
110
|
+
{ id: 'pastel', name: 'Pastel', colors: ['#FFB5E8', '#B5DEFF', '#E7FFAC'] },
|
|
111
|
+
{ id: 'vintage', name: 'Vintage', colors: ['#8B4513', '#DAA520', '#CD853F'] },
|
|
112
|
+
],
|
|
113
|
+
}, null, 2),
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
case 'list_materials':
|
|
118
|
+
return {
|
|
119
|
+
content: [
|
|
120
|
+
{
|
|
121
|
+
type: 'text',
|
|
122
|
+
text: JSON.stringify({
|
|
123
|
+
materials: [
|
|
124
|
+
{ id: 'standard', name: 'Standard', description: 'Basic material with color' },
|
|
125
|
+
{ id: 'metallic', name: 'Metallic', description: 'Metallic reflective surface' },
|
|
126
|
+
{ id: 'glass', name: 'Glass', description: 'Transparent glass material' },
|
|
127
|
+
{ id: 'plastic', name: 'Plastic', description: 'Shiny plastic surface' },
|
|
128
|
+
{ id: 'matte', name: 'Matte', description: 'Non-reflective matte surface' },
|
|
129
|
+
{ id: 'holographic', name: 'Holographic', description: 'Rainbow holographic effect' },
|
|
130
|
+
],
|
|
131
|
+
}, null, 2),
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
default:
|
|
136
|
+
return {
|
|
137
|
+
content: [{ type: 'text', text: `Unknown discovery tool: ${name}` }],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA+CH,kDA2GC;AAtJD,iCAAi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;4BACE,SAAS,EAAE;gCACT,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,2BAA2B,EAAE;gCAC9E,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,6BAA6B,EAAE;gCAChF,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE;gCACzE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,uBAAuB,EAAE;gCACxE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE;gCAC3E,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,4BAA4B,EAAE;6BACtF;yBACF,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;aACF,CAAA;QAEH;YACE,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,IAAI,EAAE,EAAE,CAAC;aACrE,CAAA;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Tools
|
|
3
|
+
*
|
|
4
|
+
* Tools for searching and discovering images:
|
|
5
|
+
* - search_images: Search for free stock images from Lummi
|
|
6
|
+
*
|
|
7
|
+
* These tools call the Efecto REST API endpoints.
|
|
8
|
+
*/
|
|
9
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
10
|
+
export declare const imageTools: Tool[];
|
|
11
|
+
/**
|
|
12
|
+
* Handle image tool calls
|
|
13
|
+
*/
|
|
14
|
+
export declare function handleImageTool(name: string, args: Record<string, unknown> | undefined): Promise<{
|
|
15
|
+
content: Array<{
|
|
16
|
+
type: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=images.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../src/tools/images.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAA;AAM9D,eAAO,MAAM,UAAU,EAAE,IAAI,EAsC5B,CAAA;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACxC,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAqH7D"}
|