@elementor/angie-sdk 1.0.3 → 1.0.4

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/README.md +80 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @elementor/angie-sdk
2
2
 
3
- Based on [MCP](https://github.com/modelcontextprotocol/typescript-sdk) version: 1.17.4
3
+ Based on [MCP](https://github.com/modelcontextprotocol/typescript-sdk) version: 1.20.1
4
4
 
5
5
  **An SDK for extending Angie AI Assistant capabilities.**
6
6
 
@@ -15,8 +15,10 @@ This SDK enables you to create custom MCP servers that Angie can discover and us
15
15
  - [Supported MCP Features](#supported-mcp-features)
16
16
  - [Installation](#installation)
17
17
  - [Quick Start](#quick-start)
18
+ - [Async Registration](#async-registration)
18
19
  - [Triggering Angie with Prompts](#triggering-angie-with-prompts)
19
20
  - [MCP Server Example](#mcp-server-example)
21
+ - [Adding Instructions to MCP Servers](#adding-instructions-to-mcp-servers)
20
22
  - [Registering Tools](#registering-tools)
21
23
  - [Handling Tool Calls](#handling-tool-calls)
22
24
  - [Best Practices](#best-practices)
@@ -91,10 +93,17 @@ The SDK covers three main abilities:
91
93
  ```
92
94
 
93
95
  ## Supported MCP Features
94
- * Resources
95
- * Notifications
96
- * Tools
97
- * Sampling
96
+
97
+ **Supported:**
98
+ - Tools, Resources, Notifications, Sampling (via backend)
99
+
100
+ **Not Supported Yet:**
101
+ - Prompts (shown in inspector only), OAuth 2.0 external auth, Elicitation
102
+
103
+ **Not Available:**
104
+ - Roots, STDIO transport (browser environment limitations)
105
+
106
+ 📖 **For detailed feature documentation and best practices, see [MCP SDK Supported Features](./docs/angie-sdk-supported-features.md)**
98
107
 
99
108
  ---
100
109
 
@@ -124,8 +133,11 @@ import {
124
133
  // Define the MCP server
125
134
  function createSeoMcpServer() {
126
135
  const server = new McpServer(
127
- { name: 'my-seo-server', version: '1.0.0' },
128
- { capabilities: { tools: {} } }
136
+ { name: 'my-seo-server', title: 'SEO', version: '1.0.0' },
137
+ {
138
+ capabilities: { tools: {} },
139
+ instructions: `Guidelines for when to use this server and its capabilities.`
140
+ }
129
141
  );
130
142
 
131
143
  // Add your tools, resources, etc.
@@ -137,7 +149,10 @@ function createSeoMcpServer() {
137
149
  // Register the server with Angie
138
150
  const server = createSeoMcpServer();
139
151
  const sdk = new AngieMcpSdk();
140
- await sdk.registerServer({
152
+
153
+ await sdk.waitForReady();
154
+
155
+ sdk.registerServer({
141
156
  name: 'my-seo-server',
142
157
  version: '1.0.0',
143
158
  description: 'SEO tools for Angie',
@@ -145,6 +160,15 @@ await sdk.registerServer({
145
160
  });
146
161
  ```
147
162
 
163
+ ### Async Registration
164
+
165
+ The `registerServer()` method is asynchronous and returns a Promise.
166
+ In most cases, you don't need to `await` it since registration happens in the background.
167
+
168
+ **Use `await sdk.registerServer(...)` when:**
169
+ - You need to ensure registration is complete before proceeding
170
+ - You need to catch and handle registration errors explicitly
171
+
148
172
  ---
149
173
 
150
174
  ## Triggering Angie with Prompts
@@ -157,7 +181,10 @@ import { AngieMcpSdk } from '@elementor/angie-sdk';
157
181
  // Register your MCP server and trigger Angie
158
182
  const server = createSeoMcpServer();
159
183
  const sdk = new AngieMcpSdk();
160
- await sdk.registerServer({
184
+
185
+ await sdk.waitForReady();
186
+
187
+ sdk.registerServer({
161
188
  name: 'my-seo-server',
162
189
  version: '1.0.0',
163
190
  description: 'SEO tools for Angie',
@@ -217,6 +244,50 @@ your-plugin/
217
244
 
218
245
  ---
219
246
 
247
+ ## Adding Instructions to MCP Servers
248
+
249
+ Instructions are guidelines that describe when to use your MCP server and what its capabilities are. They help Angie understand what your server can and cannot do, ensuring appropriate tool selection and proper user expectations.
250
+
251
+ ### Why Add Instructions?
252
+
253
+ - Guide Angie on when your server is the right choice for a task
254
+ - Clarify what capabilities are available
255
+ - Set clear boundaries on what cannot be done
256
+ - Improve tool selection accuracy
257
+
258
+ ### How to Add Instructions
259
+
260
+ Provide instructions in the second parameter during server initialization:
261
+
262
+ ```typescript
263
+ const server = new McpServer(
264
+ { name: 'content-writer', title: 'Content Writer', version: '1.0.0' },
265
+ {
266
+ instructions: `Guidelines for using the Text Content Management server.
267
+
268
+ ### Capabilities:
269
+ - **Generate new content**: Creates blog posts, page content, headlines, product descriptions
270
+ - **Edit existing content**: Refines or adjusts text based on specific instructions
271
+ - **Content variations**: Creates multiple versions for A/B testing or different audiences
272
+
273
+ ### Limitations:
274
+ - **SEO optimization**: Cannot analyze or optimize for specific keywords or search rankings
275
+ - **Fact checking**: Cannot verify accuracy against real-world data
276
+ - **Plagiarism checking**: Cannot verify content originality`
277
+ }
278
+ );
279
+ ```
280
+
281
+ ### Best Practices
282
+
283
+ 1. **Describe Capabilities Clearly**: Explain what each capability does and when to use it, not just feature names
284
+ 2. **Define Use Cases**: Help Angie understand when your server is the right choice for a task
285
+ 3. **Set Clear Boundaries**: Explicitly state what your server cannot do to prevent inappropriate tool calls
286
+ 4. **Keep Updated**: Refresh instructions when you add or remove tools
287
+ 5. **Use Action-Oriented Language**: Focus on what users can accomplish with your server
288
+
289
+ ---
290
+
220
291
  ## Registering Tools
221
292
 
222
293
  Each tool must be registered with:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/angie-sdk",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "TypeScript SDK for Angie AI assistant",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",