@frontmcp/skills 1.0.4 → 1.1.0-beta.1

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 (133) hide show
  1. package/catalog/frontmcp-authorities/SKILL.md +272 -0
  2. package/catalog/frontmcp-authorities/references/authority-profiles.md +262 -0
  3. package/catalog/frontmcp-authorities/references/claims-mapping.md +266 -0
  4. package/catalog/frontmcp-authorities/references/custom-evaluators.md +420 -0
  5. package/catalog/frontmcp-authorities/references/rbac-abac-rebac.md +391 -0
  6. package/catalog/frontmcp-channels/SKILL.md +122 -0
  7. package/catalog/frontmcp-channels/examples/channel-sources/agent-notify.md +70 -0
  8. package/catalog/frontmcp-channels/examples/channel-sources/app-errors.md +71 -0
  9. package/catalog/frontmcp-channels/examples/channel-sources/file-watcher.md +102 -0
  10. package/catalog/frontmcp-channels/examples/channel-sources/job-completion.md +79 -0
  11. package/catalog/frontmcp-channels/examples/channel-sources/replay-buffer.md +106 -0
  12. package/catalog/frontmcp-channels/examples/channel-sources/service-connector.md +136 -0
  13. package/catalog/frontmcp-channels/examples/channel-sources/webhook-github.md +85 -0
  14. package/catalog/frontmcp-channels/examples/channel-two-way/whatsapp-bridge.md +133 -0
  15. package/catalog/frontmcp-channels/references/channel-sources.md +214 -0
  16. package/catalog/frontmcp-channels/references/channel-two-way.md +195 -0
  17. package/catalog/frontmcp-config/SKILL.md +20 -18
  18. package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +1 -2
  19. package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +1 -2
  20. package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +1 -2
  21. package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +1 -2
  22. package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +1 -2
  23. package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +1 -2
  24. package/catalog/frontmcp-config/examples/configure-deployment-targets/distributed-ha-config.md +121 -0
  25. package/catalog/frontmcp-config/examples/configure-deployment-targets/json-schema-ide-support.md +64 -0
  26. package/catalog/frontmcp-config/examples/configure-deployment-targets/multi-target-with-security.md +113 -0
  27. package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +1 -2
  28. package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +1 -2
  29. package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +1 -2
  30. package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +1 -2
  31. package/catalog/frontmcp-config/examples/configure-security-headers/csp-report-only.md +69 -0
  32. package/catalog/frontmcp-config/examples/configure-security-headers/full-production-headers.md +91 -0
  33. package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +1 -2
  34. package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +1 -2
  35. package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +1 -2
  36. package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +1 -2
  37. package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +1 -2
  38. package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +1 -2
  39. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +1 -2
  40. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +1 -2
  41. package/catalog/frontmcp-config/references/configure-deployment-targets.md +214 -0
  42. package/catalog/frontmcp-config/references/configure-elicitation.md +1 -2
  43. package/catalog/frontmcp-config/references/configure-security-headers.md +198 -0
  44. package/catalog/frontmcp-deployment/SKILL.md +1 -0
  45. package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +1 -2
  46. package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +1 -2
  47. package/catalog/frontmcp-deployment/examples/build-for-mcpb/mcpb-bundle-build.md +117 -0
  48. package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +1 -3
  49. package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +1 -2
  50. package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +3 -3
  51. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +1 -2
  52. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +1 -2
  53. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +1 -2
  54. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +1 -2
  55. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +1 -2
  56. package/catalog/frontmcp-deployment/examples/mcp-client-integration/http-remote.md +106 -0
  57. package/catalog/frontmcp-deployment/examples/mcp-client-integration/stdio-binary-with-env.md +107 -0
  58. package/catalog/frontmcp-deployment/examples/mcp-client-integration/stdio-npx.md +89 -0
  59. package/catalog/frontmcp-deployment/references/build-for-mcpb.md +209 -0
  60. package/catalog/frontmcp-deployment/references/build-for-sdk.md +1 -2
  61. package/catalog/frontmcp-deployment/references/mcp-client-integration.md +225 -0
  62. package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +3 -6
  63. package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +1 -2
  64. package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +2 -4
  65. package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +1 -2
  66. package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +1 -2
  67. package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +1 -2
  68. package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +2 -3
  69. package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +1 -2
  70. package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +2 -5
  71. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +4 -3
  72. package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +2 -3
  73. package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +1 -2
  74. package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +2 -2
  75. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +1 -2
  76. package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +2 -4
  77. package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +1 -2
  78. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +3 -6
  79. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +1 -2
  80. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +2 -4
  81. package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +3 -5
  82. package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +5 -5
  83. package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +4 -6
  84. package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +3 -5
  85. package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +4 -5
  86. package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +3 -5
  87. package/catalog/frontmcp-development/references/create-agent.md +4 -7
  88. package/catalog/frontmcp-development/references/create-job.md +3 -6
  89. package/catalog/frontmcp-development/references/create-plugin-hooks.md +12 -16
  90. package/catalog/frontmcp-development/references/create-skill-with-tools.md +2 -3
  91. package/catalog/frontmcp-development/references/create-tool.md +93 -23
  92. package/catalog/frontmcp-development/references/create-workflow.md +2 -3
  93. package/catalog/frontmcp-development/references/decorators-guide.md +32 -36
  94. package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +4 -4
  95. package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +4 -4
  96. package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +4 -3
  97. package/catalog/frontmcp-guides/SKILL.md +3 -3
  98. package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +4 -5
  99. package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +4 -3
  100. package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +4 -4
  101. package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +1 -2
  102. package/catalog/frontmcp-guides/references/example-knowledge-base.md +22 -17
  103. package/catalog/frontmcp-guides/references/example-task-manager.md +16 -11
  104. package/catalog/frontmcp-guides/references/example-weather-api.md +6 -3
  105. package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +2 -3
  106. package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +4 -3
  107. package/catalog/frontmcp-observability/references/telemetry-api.md +2 -3
  108. package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +1 -2
  109. package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +3 -4
  110. package/catalog/frontmcp-production-readiness/examples/distributed-ha/ha-kubernetes-3-replicas.md +229 -0
  111. package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +2 -3
  112. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +1 -2
  113. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +2 -4
  114. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +2 -3
  115. package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +3 -2
  116. package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +2 -2
  117. package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +3 -3
  118. package/catalog/frontmcp-production-readiness/references/distributed-ha.md +194 -0
  119. package/catalog/frontmcp-setup/SKILL.md +11 -11
  120. package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +5 -3
  121. package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +4 -2
  122. package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +4 -2
  123. package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +4 -2
  124. package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +8 -7
  125. package/catalog/frontmcp-setup/references/setup-project.md +10 -9
  126. package/catalog/frontmcp-setup/references/setup-redis.md +19 -16
  127. package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +1 -3
  128. package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +1 -3
  129. package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +2 -2
  130. package/catalog/frontmcp-testing/references/test-direct-client.md +1 -3
  131. package/catalog/frontmcp-testing/references/test-tool-unit.md +2 -2
  132. package/catalog/skills-manifest.json +325 -3
  133. package/package.json +1 -1
@@ -21,9 +21,9 @@ Demonstrates combining the Cache plugin for tool result caching with the Feature
21
21
 
22
22
  ```typescript
23
23
  // src/server.ts
24
- import { FrontMcp, App } from '@frontmcp/sdk';
25
24
  import CachePlugin from '@frontmcp/plugin-cache';
26
25
  import FeatureFlagPlugin from '@frontmcp/plugin-feature-flags';
26
+ import { App, FrontMcp } from '@frontmcp/sdk';
27
27
 
28
28
  @App({
29
29
  name: 'api',
@@ -55,8 +55,7 @@ class MyServer {}
55
55
 
56
56
  ```typescript
57
57
  // src/tools/get-weather.tool.ts
58
- import { Tool, ToolContext } from '@frontmcp/sdk';
59
- import { z } from 'zod';
58
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
60
59
 
61
60
  // Per-tool cache metadata with custom TTL and sliding window
62
61
  @Tool({
@@ -80,8 +79,7 @@ class GetWeatherTool extends ToolContext {
80
79
 
81
80
  ```typescript
82
81
  // src/tools/beta-search.tool.ts
83
- import { Tool, ToolContext } from '@frontmcp/sdk';
84
- import { z } from 'zod';
82
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
85
83
 
86
84
  // Tool gated behind a feature flag -- hidden from list_tools when flag is off
87
85
  @Tool({
@@ -24,12 +24,12 @@ Demonstrates a production-ready server configuration combining CodeCall, Remembe
24
24
 
25
25
  ```typescript
26
26
  // src/server.ts
27
- import { FrontMcp, App } from '@frontmcp/sdk';
28
- import CodeCallPlugin from '@frontmcp/plugin-codecall';
29
- import RememberPlugin from '@frontmcp/plugin-remember';
30
27
  import { ApprovalPlugin } from '@frontmcp/plugin-approval';
31
28
  import CachePlugin from '@frontmcp/plugin-cache';
29
+ import CodeCallPlugin from '@frontmcp/plugin-codecall';
32
30
  import FeatureFlagPlugin from '@frontmcp/plugin-feature-flags';
31
+ import RememberPlugin from '@frontmcp/plugin-remember';
32
+ import { App, FrontMcp } from '@frontmcp/sdk';
33
33
 
34
34
  @App({ name: 'core', tools: [ReadDataTool, WriteDataTool, DeleteDataTool] })
35
35
  class CoreApp {}
@@ -89,8 +89,7 @@ class ProductionServer {}
89
89
 
90
90
  ```typescript
91
91
  // src/tools/delete-data.tool.ts
92
- import { Tool, ToolContext } from '@frontmcp/sdk';
93
- import { z } from 'zod';
92
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
94
93
 
95
94
  @Tool({
96
95
  name: 'delete_data',
@@ -20,8 +20,8 @@ Demonstrates installing the Remember plugin and using `this.remember` in tools t
20
20
 
21
21
  ```typescript
22
22
  // src/server.ts
23
- import { FrontMcp, App } from '@frontmcp/sdk';
24
23
  import RememberPlugin from '@frontmcp/plugin-remember';
24
+ import { App, FrontMcp } from '@frontmcp/sdk';
25
25
 
26
26
  @App({ name: 'my-app', tools: [PreferencesTool, GreetingTool] })
27
27
  class MyApp {}
@@ -41,8 +41,7 @@ class MyServer {}
41
41
 
42
42
  ```typescript
43
43
  // src/tools/preferences.tool.ts
44
- import { Tool, ToolContext } from '@frontmcp/sdk';
45
- import { z } from 'zod';
44
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
46
45
 
47
46
  @Tool({
48
47
  name: 'set_preferences',
@@ -64,8 +63,7 @@ class PreferencesTool extends ToolContext {
64
63
 
65
64
  ```typescript
66
65
  // src/tools/greeting.tool.ts
67
- import { Tool, ToolContext } from '@frontmcp/sdk';
68
- import { z } from 'zod';
66
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
69
67
 
70
68
  @Tool({
71
69
  name: 'get_greeting',
@@ -43,8 +43,7 @@ Agents are autonomous AI entities that use an LLM to reason, plan, and invoke in
43
43
  Create a class extending `AgentContext<In, Out>` and optionally override the `execute(input: In): Promise<Out>` method. The `@Agent` decorator requires `name`, `description`, and `llm` configuration.
44
44
 
45
45
  ```typescript
46
- import { Agent, AgentContext } from '@frontmcp/sdk';
47
- import { z } from 'zod';
46
+ import { Agent, AgentContext, z } from '@frontmcp/sdk';
48
47
 
49
48
  @Agent({
50
49
  name: 'code_reviewer',
@@ -242,8 +241,7 @@ async execute(input: { text: string }) {
242
241
  The `tools` array in `@Agent` metadata defines tools that the agent itself can invoke during its reasoning loop. These are NOT exposed to external callers -- they are private to the agent.
243
242
 
244
243
  ```typescript
245
- import { Tool, ToolContext, Agent, AgentContext } from '@frontmcp/sdk';
246
- import { z } from 'zod';
244
+ import { Agent, AgentContext, Tool, ToolContext, z } from '@frontmcp/sdk';
247
245
 
248
246
  @Tool({
249
247
  name: 'fetch_pr',
@@ -406,8 +404,7 @@ class BillingAgent extends AgentContext {}
406
404
  For agents that do not need a class, use the `agent()` function builder.
407
405
 
408
406
  ```typescript
409
- import { agent } from '@frontmcp/sdk';
410
- import { z } from 'zod';
407
+ import { agent, z } from '@frontmcp/sdk';
411
408
 
412
409
  const QuickSummarizer = agent({
413
410
  name: 'quick_summarizer',
@@ -458,7 +455,7 @@ Both return values that can be registered in `agents: [ExternalAgent, CloudAgent
458
455
  Add agent classes (or function-style agents) to the `agents` array in `@FrontMcp` or `@App`.
459
456
 
460
457
  ```typescript
461
- import { FrontMcp, App } from '@frontmcp/sdk';
458
+ import { App, FrontMcp } from '@frontmcp/sdk';
462
459
 
463
460
  @App({
464
461
  name: 'review-app',
@@ -50,8 +50,7 @@ Create a class extending `JobContext<In, Out>` and implement the `execute(input:
50
50
  ### Basic Example
51
51
 
52
52
  ```typescript
53
- import { Job, JobContext } from '@frontmcp/sdk';
54
- import { z } from 'zod';
53
+ import { Job, JobContext, z } from '@frontmcp/sdk';
55
54
 
56
55
  @Job({
57
56
  name: 'generate-report',
@@ -339,8 +338,7 @@ permissions: {
339
338
  For simple jobs that do not need a class, use the `job()` function builder. The callback receives `(input, ctx)` where `ctx` provides all `JobContext` methods.
340
339
 
341
340
  ```typescript
342
- import { job } from '@frontmcp/sdk';
343
- import { z } from 'zod';
341
+ import { job, z } from '@frontmcp/sdk';
344
342
 
345
343
  const CleanupTempFiles = job({
346
344
  name: 'cleanup-temp-files',
@@ -444,8 +442,7 @@ This creates the job file, spec file, and updates barrel exports.
444
442
  ## Complete Example: Data Pipeline Job
445
443
 
446
444
  ```typescript
447
- import { Job, JobContext, FrontMcp, App, job } from '@frontmcp/sdk';
448
- import { z } from 'zod';
445
+ import { App, FrontMcp, Job, job, JobContext, z } from '@frontmcp/sdk';
449
446
 
450
447
  @Job({
451
448
  name: 'etl-pipeline',
@@ -72,7 +72,7 @@ In addition to flow-based hooks, plugins can register callbacks for server lifec
72
72
  Runs after the HTTP server is fully initialized and listening. Use for warming caches, starting background indexing, or logging readiness.
73
73
 
74
74
  ```typescript
75
- import { Plugin, DynamicPlugin } from '@frontmcp/sdk';
75
+ import { DynamicPlugin, Plugin } from '@frontmcp/sdk';
76
76
 
77
77
  @Plugin({
78
78
  name: 'cache-warmer',
@@ -105,12 +105,12 @@ For convenience, FrontMCP exports typed aliases so you do not need to call `Flow
105
105
 
106
106
  ```typescript
107
107
  import {
108
- ToolHook, // FlowHooksOf('tools:call-tool')
109
- ListToolsHook, // FlowHooksOf('tools:list-tools')
110
- ResourceHook, // FlowHooksOf('resources:read-resource')
111
- ListResourcesHook, // FlowHooksOf('resources:list-resources')
112
108
  AgentCallHook, // FlowHooksOf('agents:call-agent')
113
109
  HttpHook, // FlowHooksOf('http:request')
110
+ ListResourcesHook, // FlowHooksOf('resources:list-resources')
111
+ ListToolsHook, // FlowHooksOf('tools:list-tools')
112
+ ResourceHook, // FlowHooksOf('resources:read-resource')
113
+ ToolHook, // FlowHooksOf('tools:call-tool')
114
114
  } from '@frontmcp/sdk';
115
115
  ```
116
116
 
@@ -152,8 +152,7 @@ Both `@Will` and `@Did` (and `@Around`) accept an optional options object:
152
152
  ### Logging Plugin
153
153
 
154
154
  ```typescript
155
- import { Plugin } from '@frontmcp/sdk';
156
- import { ToolHook } from '@frontmcp/sdk';
155
+ import { Plugin, ToolHook } from '@frontmcp/sdk';
157
156
 
158
157
  const { Will, Did } = ToolHook;
159
158
 
@@ -174,8 +173,7 @@ export class LoggingPlugin {
174
173
  ### Authorization Check Plugin
175
174
 
176
175
  ```typescript
177
- import { Plugin } from '@frontmcp/sdk';
178
- import { ToolHook } from '@frontmcp/sdk';
176
+ import { Plugin, ToolHook } from '@frontmcp/sdk';
179
177
 
180
178
  const { Will } = ToolHook;
181
179
 
@@ -194,8 +192,7 @@ export class AuthCheckPlugin {
194
192
  ### Caching Plugin with @Around
195
193
 
196
194
  ```typescript
197
- import { Plugin } from '@frontmcp/sdk';
198
- import { ToolHook } from '@frontmcp/sdk';
195
+ import { Plugin, ToolHook } from '@frontmcp/sdk';
199
196
 
200
197
  const { Around } = ToolHook;
201
198
 
@@ -227,8 +224,7 @@ export class CachePlugin {
227
224
  ### Stage Replacement
228
225
 
229
226
  ```typescript
230
- import { Plugin } from '@frontmcp/sdk';
231
- import { ToolHook } from '@frontmcp/sdk';
227
+ import { Plugin, ToolHook } from '@frontmcp/sdk';
232
228
 
233
229
  const { Stage } = ToolHook;
234
230
 
@@ -249,8 +245,9 @@ Register plugins in your `@App` decorator:
249
245
 
250
246
  ```typescript
251
247
  import { App } from '@frontmcp/sdk';
252
- import { LoggingPlugin } from './plugins/logging.plugin';
248
+
253
249
  import { CachePlugin } from './plugins/cache.plugin';
250
+ import { LoggingPlugin } from './plugins/logging.plugin';
254
251
 
255
252
  @App({
256
253
  name: 'my-app',
@@ -266,8 +263,7 @@ Plugins are initialized in array order. Hook priority determines execution order
266
263
  You can add hook methods directly on a `@Tool` class to intercept its own execution flow. The hooks apply only when **this tool** is called:
267
264
 
268
265
  ```typescript
269
- import { Tool, ToolContext } from '@frontmcp/sdk';
270
- import { z } from 'zod';
266
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
271
267
 
272
268
  const { Will, Did } = ToolHook;
273
269
 
@@ -431,7 +431,7 @@ Both return values that can be registered in `skills: [ExternalSkill, CloudSkill
431
431
  Add skill classes (or function-style skills) to the `skills` array in `@FrontMcp` or `@App`.
432
432
 
433
433
  ```typescript
434
- import { FrontMcp, App } from '@frontmcp/sdk';
434
+ import { App, FrontMcp } from '@frontmcp/sdk';
435
435
 
436
436
  @App({
437
437
  name: 'devops-app',
@@ -505,8 +505,7 @@ GET /skills
505
505
  ## Complete Example: Multi-Tool Orchestration Skill
506
506
 
507
507
  ```typescript
508
- import { Skill, SkillContext, Tool, ToolContext, FrontMcp, App } from '@frontmcp/sdk';
509
- import { z } from 'zod';
508
+ import { App, FrontMcp, Skill, SkillContext, Tool, ToolContext, z } from '@frontmcp/sdk';
510
509
 
511
510
  // Define the tools that the skill references
512
511
 
@@ -34,8 +34,7 @@ Tools are the primary way to expose executable actions to AI clients in the MCP
34
34
  Create a class extending `ToolContext<In, Out>` and implement the `execute(input: In): Promise<Out>` method. The `@Tool` decorator requires at minimum a `name` and an `inputSchema`.
35
35
 
36
36
  ```typescript
37
- import { Tool, ToolContext } from '@frontmcp/sdk';
38
- import { z } from 'zod';
37
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
39
38
 
40
39
  @Tool({
41
40
  name: 'greet_user',
@@ -158,6 +157,65 @@ class GetWeatherTool extends ToolContext {
158
157
  - CodeCall cannot infer return types for chaining tool calls in VM scripts
159
158
  - No compile-time type checking on the return value
160
159
 
160
+ ### Typed Output Patterns
161
+
162
+ The `Out` generic on `ToolContext<InSchema, OutSchema, In, Out>` is inferred from `outputSchema`. You can wire the generics explicitly for full type safety — no `as any` casts needed:
163
+
164
+ ```typescript
165
+ const inputSchema = {
166
+ city: z.string(),
167
+ };
168
+
169
+ const outputSchema = {
170
+ temperature: z.number(),
171
+ unit: z.enum(['celsius', 'fahrenheit']),
172
+ };
173
+
174
+ @Tool({
175
+ name: 'get_weather',
176
+ inputSchema,
177
+ outputSchema,
178
+ })
179
+ // No generics needed — ToolContext infers types from the @Tool decorator
180
+ class GetWeatherTool extends ToolContext {
181
+ async execute(input: { city: string }) {
182
+ // Return type is inferred as { temperature: number; unit: 'celsius' | 'fahrenheit' }
183
+ // TypeScript will error if you return the wrong shape
184
+ return { temperature: 22, unit: 'celsius' as const };
185
+ }
186
+ }
187
+ ```
188
+
189
+ **`return` vs `this.respond()`** — Both work and both are validated against `outputSchema` in the finalize stage:
190
+
191
+ ```typescript
192
+ // Option 1: return (preferred — simpler, same validation)
193
+ async execute(input: Input) {
194
+ return { temperature: 22, unit: 'celsius' };
195
+ }
196
+
197
+ // Option 2: this.respond() — useful for early exit (throws FlowControl.respond internally)
198
+ async execute(input: Input) {
199
+ if (someCondition) {
200
+ this.respond({ temperature: 0, unit: 'celsius' }); // never returns
201
+ }
202
+ return { temperature: 22, unit: 'celsius' };
203
+ }
204
+ ```
205
+
206
+ **Early returns from elicitation** must still match the output schema:
207
+
208
+ ```typescript
209
+ async execute(input: Input) {
210
+ const result = await this.elicit('Confirm?', { confirm: z.boolean() });
211
+ if (result.action !== 'accept') {
212
+ // Must return a value matching outputSchema, not a raw string
213
+ return { temperature: 0, unit: 'celsius' as const };
214
+ }
215
+ // ... normal execution
216
+ }
217
+ ```
218
+
161
219
  Supported `outputSchema` types:
162
220
 
163
221
  - **Zod raw shapes** (recommended): `{ field: z.string(), count: z.number() }` — structured JSON output with validation
@@ -263,7 +321,7 @@ class DeleteRecordTool extends ToolContext {
263
321
  For MCP-specific errors, use error classes with JSON-RPC codes:
264
322
 
265
323
  ```typescript
266
- import { ResourceNotFoundError, PublicMcpError, MCP_ERROR_CODES } from '@frontmcp/sdk';
324
+ import { MCP_ERROR_CODES, PublicMcpError, ResourceNotFoundError } from '@frontmcp/sdk';
267
325
 
268
326
  this.fail(new ResourceNotFoundError(`Record ${input.id}`));
269
327
  ```
@@ -348,8 +406,7 @@ Annotation fields:
348
406
  For simple tools that do not need a class, use the `tool()` function builder. It returns a value you register the same way as a class tool.
349
407
 
350
408
  ```typescript
351
- import { tool } from '@frontmcp/sdk';
352
- import { z } from 'zod';
409
+ import { tool, z } from '@frontmcp/sdk';
353
410
 
354
411
  const AddNumbers = tool({
355
412
  name: 'add_numbers',
@@ -395,7 +452,7 @@ Both return values that can be registered in `tools: [RemoteTool, CloudTool]`.
395
452
  Add tool classes (or function-style tools) to the `tools` array in `@FrontMcp` or `@App`.
396
453
 
397
454
  ```typescript
398
- import { FrontMcp, App } from '@frontmcp/sdk';
455
+ import { App, FrontMcp } from '@frontmcp/sdk';
399
456
 
400
457
  @App({
401
458
  name: 'my-app',
@@ -549,7 +606,20 @@ if (this.isEnv('production')) {
549
606
 
550
607
  ## Elicitation (Interactive Input)
551
608
 
552
- Tools can request interactive input from users mid-execution using `this.elicit()`. Requires `elicitation` to be enabled at server level.
609
+ Tools can request interactive input from users mid-execution using `this.elicit()`.
610
+
611
+ > **Prerequisite:** Elicitation must be enabled at server level:
612
+ >
613
+ > ```typescript
614
+ > @FrontMcp({
615
+ > elicitation: { enabled: true },
616
+ > // ... rest of config
617
+ > })
618
+ > ```
619
+ >
620
+ > See `configure-elicitation` for full configuration options including Redis-backed elicitation stores.
621
+ >
622
+ > **What happens without it:** Calling `this.elicit()` throws `ElicitationDisabledError` at runtime with the message: _"Elicitation is disabled in server configuration. Enable it via @FrontMcp({ elicitation: { enabled: true } })"_. The tool call fails and the error is returned to the client. There is no compile-time or startup warning — the error only occurs when the tool is actually invoked.
553
623
 
554
624
  ```typescript
555
625
  @Tool({
@@ -573,8 +643,6 @@ class ConfirmDeleteTool extends ToolContext {
573
643
  }
574
644
  ```
575
645
 
576
- > **Note:** Elicitation must be enabled at server level: `@FrontMcp({ elicitation: { enabled: true } })`. See `configure-elicitation` for full configuration options.
577
-
578
646
  ## Tool Examples
579
647
 
580
648
  Provide usage examples for documentation and discovery:
@@ -607,13 +675,14 @@ class ConvertCurrencyTool extends ToolContext {
607
675
 
608
676
  ## Common Patterns
609
677
 
610
- | Pattern | Correct | Incorrect | Why |
611
- | -------------- | ----------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------- |
612
- | Input schema | `inputSchema: { name: z.string() }` (raw shape) | `inputSchema: z.object({ name: z.string() })` | Framework wraps in `z.object()` internally |
613
- | Output schema | Always define `outputSchema` | Omit `outputSchema` | Prevents data leaks and enables CodeCall chaining |
614
- | DI resolution | `this.get(TOKEN)` with proper error handling | `this.tryGet(TOKEN)!` with non-null assertion | `get` throws a clear error; non-null assertions mask failures |
615
- | Error handling | `this.fail(new ResourceNotFoundError(...))` | `throw new Error(...)` | `this.fail` triggers the error flow with MCP error codes |
616
- | Tool naming | `snake_case` names: `get_weather` | `camelCase` or `PascalCase`: `getWeather` | MCP protocol convention for tool names |
678
+ | Pattern | Correct | Incorrect | Why |
679
+ | -------------------- | ----------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
680
+ | Input schema | `inputSchema: { name: z.string() }` (raw shape) | `inputSchema: z.object({ name: z.string() })` | Framework wraps in `z.object()` internally |
681
+ | Output schema | Always define `outputSchema` | Omit `outputSchema` | Prevents data leaks and enables CodeCall chaining |
682
+ | DI resolution | `this.get(TOKEN)` with proper error handling | `this.tryGet(TOKEN)!` with non-null assertion | `get` throws a clear error; non-null assertions mask failures |
683
+ | Error handling | `this.fail(new ResourceNotFoundError(...))` | `throw new Error(...)` | `this.fail` triggers the error flow with MCP error codes |
684
+ | Tool naming | `snake_case` names: `get_weather` | `camelCase` or `PascalCase`: `getWeather` | MCP protocol convention for tool names |
685
+ | ToolContext generics | `class MyTool extends ToolContext` | `class MyTool extends ToolContext<typeof inputSchema>` | Types are auto-inferred from `@Tool` decorator — explicit generics are redundant |
617
686
 
618
687
  ## Verification Checklist
619
688
 
@@ -634,13 +703,14 @@ class ConvertCurrencyTool extends ToolContext {
634
703
 
635
704
  ## Troubleshooting
636
705
 
637
- | Problem | Cause | Solution |
638
- | ------------------------------------------------ | ------------------------------------------- | ---------------------------------------------------------------------------- |
639
- | Tool not appearing in `tools/list` | Not registered in `tools` array | Add tool class to `@App` or `@FrontMcp` `tools` array |
640
- | Zod validation error on valid input | Using `z.object()` wrapper in `inputSchema` | Use raw shape: `{ field: z.string() }` not `z.object({ field: z.string() })` |
641
- | `this.get(TOKEN)` throws DependencyNotFoundError | Provider not registered in scope | Register provider in `providers` array of `@App` or `@FrontMcp` |
642
- | Output contains unexpected fields | No `outputSchema` defined | Add `outputSchema` to strip unvalidated fields from response |
643
- | Tool times out | No timeout configured for long operation | Add `timeout: { executeMs: 30_000 }` to `@Tool` options |
706
+ | Problem | Cause | Solution |
707
+ | ------------------------------------------------- | ------------------------------------------- | ---------------------------------------------------------------------------- |
708
+ | Tool not appearing in `tools/list` | Not registered in `tools` array | Add tool class to `@App` or `@FrontMcp` `tools` array |
709
+ | Zod validation error on valid input | Using `z.object()` wrapper in `inputSchema` | Use raw shape: `{ field: z.string() }` not `z.object({ field: z.string() })` |
710
+ | `this.get(TOKEN)` throws DependencyNotFoundError | Provider not registered in scope | Register provider in `providers` array of `@App` or `@FrontMcp` |
711
+ | Output contains unexpected fields | No `outputSchema` defined | Add `outputSchema` to strip unvalidated fields from response |
712
+ | Tool times out | No timeout configured for long operation | Add `timeout: { executeMs: 30_000 }` to `@Tool` options |
713
+ | `this.elicit()` throws `ElicitationDisabledError` | Elicitation not enabled at server level | Add `elicitation: { enabled: true }` to `@FrontMcp` config |
644
714
 
645
715
  ## Examples
646
716
 
@@ -422,7 +422,7 @@ Register it the same way as a class workflow: `workflows: [QuickDeploy]`.
422
422
  Add workflow classes (or function-style workflows) to the `workflows` array in `@App`. Workflows require jobs to be enabled since each step runs a named job.
423
423
 
424
424
  ```typescript
425
- import { FrontMcp, App } from '@frontmcp/sdk';
425
+ import { App, FrontMcp } from '@frontmcp/sdk';
426
426
 
427
427
  @App({
428
428
  name: 'pipeline-app',
@@ -462,8 +462,7 @@ This creates the workflow file, spec file, and updates barrel exports.
462
462
  ## Complete Example: CI/CD Pipeline
463
463
 
464
464
  ```typescript
465
- import { Workflow, Job, JobContext, FrontMcp, App, workflow } from '@frontmcp/sdk';
466
- import { z } from 'zod';
465
+ import { App, FrontMcp, Job, JobContext, Workflow, workflow, z } from '@frontmcp/sdk';
467
466
 
468
467
  // --- Jobs ---
469
468
 
@@ -61,32 +61,32 @@ FrontMCP uses a hierarchical decorator system. The nesting order is:
61
61
 
62
62
  **Key fields:**
63
63
 
64
- | Field | Description |
65
- | --------------- | -------------------------------------------------------------------------------- |
66
- | `info` | Server name, version, and description |
67
- | `apps` | Array of `@App` classes to mount |
68
- | `serve?` | Auto-start HTTP server (default: `true`). Set `false` for programmatic usage |
69
- | `splitByApp?` | If `true`, each app gets its own scope and basePath. Default: `false` |
70
- | `redis?` | Redis / Vercel KV connection for sessions, transport persistence, auth tokens |
71
- | `plugins?` | Global plugins (instantiated per scope) |
72
- | `providers?` | Global DI providers available to all apps |
73
- | `tools?` | Standalone tools (outside apps, merged with app tools) |
74
- | `resources?` | Standalone resources (merged with app resources) |
75
- | `skills?` | Standalone skills (merged with app skills) |
76
- | `skillsConfig?` | Skills HTTP endpoints (`/llm.txt`, `/skills`) and MCP tool config |
77
- | `transport?` | Transport preset (`'modern'`, `'legacy'`, `'stateless-api'`, `'full'`) or object |
78
- | `auth?` | Authentication mode: `'public'`, `'transparent'`, `'local'`, `'remote'` |
79
- | `http?` | HTTP server options (port, host, cors, socketPath) |
80
- | `logging?` | Logging configuration (transports and levels) |
81
- | `elicitation?` | Enable interactive user input during tool execution |
82
- | `sqlite?` | SQLite storage for local deployments (sessions, events) |
83
- | `pubsub?` | Redis pub/sub for resource subscriptions (falls back to `redis` config) |
84
- | `jobs?` | Background jobs/workflows system (`{ enabled, store? }`) |
85
- | `throttle?` | Server-level guard config (see note below) |
86
- | `pagination?` | List operation pagination (`tools/list` endpoint) |
87
- | `ui?` | UI rendering config (CDN overrides for widget imports) |
88
- | `extApps?` | Widget-to-host MCP Apps communication (host capabilities, session validation) |
89
- | `loader?` | Default npm/ESM package loader for `App.esm()` / `App.remote()` apps |
64
+ | Field | Description |
65
+ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
+ | `info` | Server name, version, and description |
67
+ | `apps` | Array of `@App` classes to mount |
68
+ | `serve?` | Auto-start HTTP server (default: `true`). Set `false` for programmatic usage |
69
+ | `splitByApp?` | If `true`, each app gets its own scope and basePath. Default: `false` |
70
+ | `redis?` | Redis / Vercel KV connection for sessions, transport persistence, auth tokens |
71
+ | `plugins?` | Global plugins (instantiated per scope) |
72
+ | `providers?` | Global DI providers available to all apps |
73
+ | `tools?` | Standalone tools (outside apps, merged with app tools) |
74
+ | `resources?` | Standalone resources (merged with app resources) |
75
+ | `skills?` | Standalone skills (merged with app skills) |
76
+ | `skillsConfig?` | Skills HTTP endpoints (`/llm.txt`, `/skills`) and MCP tool config |
77
+ | `transport?` | Transport preset (`'modern'`, `'legacy'`, `'stateless-api'`, `'full'`) or object |
78
+ | `auth?` | Authentication mode: `'public'`, `'transparent'`, `'local'`, `'remote'` |
79
+ | `http?` | HTTP server options (port, host, cors, socketPath) |
80
+ | `logging?` | Logging configuration (transports and levels) |
81
+ | `elicitation?` | Enable interactive user input during tool execution |
82
+ | `sqlite?` | SQLite storage for local deployments (sessions, events) |
83
+ | `pubsub?` | Redis pub/sub for distributed resource subscriptions across multiple instances (single-server deployments use in-memory subscriptions; falls back to `redis` config) |
84
+ | `jobs?` | Background jobs/workflows system (`{ enabled, store? }`) |
85
+ | `throttle?` | Server-level guard config (see note below) |
86
+ | `pagination?` | List operation pagination (`tools/list` endpoint) |
87
+ | `ui?` | UI rendering config (CDN overrides for widget imports) |
88
+ | `extApps?` | Widget-to-host MCP Apps communication (host capabilities, session validation) |
89
+ | `loader?` | Default npm/ESM package loader for `App.esm()` / `App.remote()` apps |
90
90
 
91
91
  > **Throttle vs per-tool guards:** Server-level `throttle` is a `GuardConfig` object with `global`, `defaultRateLimit`, `defaultConcurrency`, `defaultTimeout` sub-fields that set server-wide defaults. Tool-level `rateLimit`, `concurrency`, `timeout` fields (on `@Tool`) override these defaults per tool.
92
92
 
@@ -172,8 +172,7 @@ class AnalyticsApp {}
172
172
  | `ui?` | UI widget configuration for tool rendering |
173
173
 
174
174
  ```typescript
175
- import { Tool, ToolContext } from '@frontmcp/sdk';
176
- import { z } from 'zod';
175
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
177
176
 
178
177
  @Tool({
179
178
  name: 'search_users',
@@ -293,7 +292,7 @@ class AppConfigResource extends ResourceContext {
293
292
  | `icons?` | Array of Icon objects for UI representation |
294
293
 
295
294
  ```typescript
296
- import { ResourceTemplate, ResourceContext } from '@frontmcp/sdk';
295
+ import { ResourceContext, ResourceTemplate } from '@frontmcp/sdk';
297
296
 
298
297
  @ResourceTemplate({
299
298
  name: 'user_profile',
@@ -332,8 +331,7 @@ class UserProfileResource extends ResourceContext {
332
331
  | `swarm?` | Multi-agent swarm configuration |
333
332
 
334
333
  ```typescript
335
- import { Agent, AgentContext } from '@frontmcp/sdk';
336
- import { z } from 'zod';
334
+ import { Agent, AgentContext, z } from '@frontmcp/sdk';
337
335
 
338
336
  @Agent({
339
337
  name: 'research_agent',
@@ -499,8 +497,7 @@ class DatabaseProvider {}
499
497
  | `access` | Access control configuration |
500
498
 
501
499
  ```typescript
502
- import { Flow } from '@frontmcp/sdk';
503
- import { z } from 'zod';
500
+ import { Flow, z } from '@frontmcp/sdk';
504
501
 
505
502
  @Flow({
506
503
  name: 'approval-flow',
@@ -536,8 +533,7 @@ class ApprovalFlow {}
536
533
  | `permissions?` | Access control: `[{ action: 'execute', roles: ['admin'] }]` |
537
534
 
538
535
  ```typescript
539
- import { Job, JobContext } from '@frontmcp/sdk';
540
- import { z } from 'zod';
536
+ import { Job, JobContext, z } from '@frontmcp/sdk';
541
537
 
542
538
  @Job({
543
539
  name: 'sync_data',
@@ -630,7 +626,7 @@ class DeployPipeline {}
630
626
  | `@Around` | Wrapping | Wraps the flow, controlling execution |
631
627
 
632
628
  ```typescript
633
- import { Will, Did, Stage, Around, HookContext } from '@frontmcp/sdk';
629
+ import { Around, Did, HookContext, Stage, Will } from '@frontmcp/sdk';
634
630
 
635
631
  class AuditHooks {
636
632
  @Will('tools:call-tool')
@@ -21,9 +21,9 @@ Shows advanced VectoriaDB usage with typed document metadata, batch operations,
21
21
 
22
22
  ```typescript
23
23
  // src/providers/product-search.provider.ts
24
+ import { FileStorageAdapter, VectoriaDB, type DocumentMetadata } from 'vectoriadb';
25
+
24
26
  import { Provider, ProviderScope } from '@frontmcp/sdk';
25
- import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
26
- import type { DocumentMetadata } from 'vectoriadb';
27
27
 
28
28
  export const ProductSearch = Symbol('ProductSearch');
29
29
 
@@ -104,8 +104,8 @@ export class ProductSearchProvider {
104
104
 
105
105
  ```typescript
106
106
  // src/tools/find-products.tool.ts
107
- import { Tool, ToolContext } from '@frontmcp/sdk';
108
- import { z } from 'zod';
107
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
108
+
109
109
  import { ProductSearch } from '../providers/product-search.provider';
110
110
 
111
111
  @Tool({
@@ -21,9 +21,9 @@ Shows how to use `VectoriaDB` for semantic search with transformer models, filte
21
21
 
22
22
  ```typescript
23
23
  // src/providers/knowledge-base.provider.ts
24
+ import { FileStorageAdapter, VectoriaDB, type DocumentMetadata } from 'vectoriadb';
25
+
24
26
  import { Provider, ProviderScope } from '@frontmcp/sdk';
25
- import { VectoriaDB, FileStorageAdapter } from 'vectoriadb';
26
- import type { DocumentMetadata } from 'vectoriadb';
27
27
 
28
28
  export const KnowledgeBase = Symbol('KnowledgeBase');
29
29
 
@@ -80,8 +80,8 @@ export class KnowledgeBaseProvider {
80
80
 
81
81
  ```typescript
82
82
  // src/tools/semantic-search.tool.ts
83
- import { Tool, ToolContext } from '@frontmcp/sdk';
84
- import { z } from 'zod';
83
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
84
+
85
85
  import { KnowledgeBase } from '../providers/knowledge-base.provider';
86
86
 
87
87
  @Tool({
@@ -20,9 +20,10 @@ Shows how to use `TFIDFVectoria` for zero-dependency keyword search in a FrontMC
20
20
 
21
21
  ```typescript
22
22
  // src/providers/faq-search.provider.ts
23
- import { Provider, ProviderScope } from '@frontmcp/sdk';
24
23
  import { TFIDFVectoria } from 'vectoriadb';
25
24
 
25
+ import { Provider, ProviderScope } from '@frontmcp/sdk';
26
+
26
27
  export const FAQSearch = Symbol('FAQSearch');
27
28
 
28
29
  @Provider({ name: 'faq-search', provide: FAQSearch, scope: ProviderScope.GLOBAL })
@@ -55,8 +56,8 @@ export class FAQSearchProvider {
55
56
 
56
57
  ```typescript
57
58
  // src/tools/search-faq.tool.ts
58
- import { Tool, ToolContext } from '@frontmcp/sdk';
59
- import { z } from 'zod';
59
+ import { Tool, ToolContext, z } from '@frontmcp/sdk';
60
+
60
61
  import { FAQSearch } from '../providers/faq-search.provider';
61
62
 
62
63
  @Tool({