@frontmcp/skills 1.0.0-beta.9 → 1.0.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.
Files changed (284) hide show
  1. package/README.md +2 -2
  2. package/catalog/TEMPLATE.md +69 -0
  3. package/catalog/frontmcp-config/SKILL.md +38 -22
  4. package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +87 -0
  5. package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +63 -0
  6. package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +76 -0
  7. package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +77 -0
  8. package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +73 -0
  9. package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +64 -0
  10. package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +83 -0
  11. package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +87 -0
  12. package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +52 -0
  13. package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +72 -0
  14. package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +64 -0
  15. package/catalog/frontmcp-config/examples/configure-session/multi-server-key-prefix.md +68 -0
  16. package/catalog/frontmcp-config/examples/configure-session/redis-session-store.md +52 -0
  17. package/catalog/frontmcp-config/examples/configure-session/vercel-kv-session.md +52 -0
  18. package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +94 -0
  19. package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +92 -0
  20. package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +83 -0
  21. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/full-guard-config.md +99 -0
  22. package/catalog/frontmcp-config/examples/configure-throttle-guard-config/minimal-guard-config.md +55 -0
  23. package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +74 -0
  24. package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +86 -0
  25. package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +69 -0
  26. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +65 -0
  27. package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +69 -0
  28. package/catalog/frontmcp-config/references/configure-auth-modes.md +15 -0
  29. package/catalog/frontmcp-config/references/configure-auth.md +15 -0
  30. package/catalog/frontmcp-config/references/configure-elicitation.md +14 -0
  31. package/catalog/frontmcp-config/references/configure-http.md +15 -0
  32. package/catalog/frontmcp-config/references/configure-session.md +15 -0
  33. package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +14 -0
  34. package/catalog/frontmcp-config/references/configure-throttle.md +15 -0
  35. package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +14 -0
  36. package/catalog/frontmcp-config/references/configure-transport.md +15 -0
  37. package/catalog/frontmcp-config/references/setup-redis.md +10 -0
  38. package/catalog/frontmcp-config/references/setup-sqlite.md +10 -0
  39. package/catalog/frontmcp-deployment/SKILL.md +40 -12
  40. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +43 -0
  41. package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +85 -0
  42. package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +61 -0
  43. package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +66 -0
  44. package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +76 -0
  45. package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +78 -0
  46. package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +85 -0
  47. package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +104 -0
  48. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +82 -0
  49. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +97 -0
  50. package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +92 -0
  51. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +92 -0
  52. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +113 -0
  53. package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +100 -0
  54. package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +101 -0
  55. package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +79 -0
  56. package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +92 -0
  57. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +63 -0
  58. package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +89 -0
  59. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +69 -0
  60. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +82 -0
  61. package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +90 -0
  62. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +49 -0
  63. package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +92 -0
  64. package/catalog/frontmcp-deployment/references/build-for-browser.md +15 -0
  65. package/catalog/frontmcp-deployment/references/build-for-cli.md +65 -3
  66. package/catalog/frontmcp-deployment/references/build-for-sdk.md +15 -0
  67. package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +15 -0
  68. package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +18 -3
  69. package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +16 -2
  70. package/catalog/frontmcp-deployment/references/deploy-to-node.md +19 -4
  71. package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +14 -0
  72. package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +15 -0
  73. package/catalog/frontmcp-development/SKILL.md +25 -17
  74. package/catalog/frontmcp-development/examples/create-adapter/basic-api-adapter.md +92 -0
  75. package/catalog/frontmcp-development/examples/create-adapter/namespaced-adapter.md +124 -0
  76. package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +121 -0
  77. package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +95 -0
  78. package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +111 -0
  79. package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +81 -0
  80. package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +80 -0
  81. package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +87 -0
  82. package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +117 -0
  83. package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +88 -0
  84. package/catalog/frontmcp-development/examples/create-plugin/basic-plugin-with-provider.md +69 -0
  85. package/catalog/frontmcp-development/examples/create-plugin/configurable-dynamic-plugin.md +178 -0
  86. package/catalog/frontmcp-development/examples/create-plugin/plugin-with-context-extension.md +107 -0
  87. package/catalog/frontmcp-development/examples/create-plugin-hooks/basic-logging-plugin.md +69 -0
  88. package/catalog/frontmcp-development/examples/create-plugin-hooks/caching-with-around.md +80 -0
  89. package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +100 -0
  90. package/catalog/frontmcp-development/examples/create-prompt/basic-prompt.md +72 -0
  91. package/catalog/frontmcp-development/examples/create-prompt/dynamic-rag-prompt.md +92 -0
  92. package/catalog/frontmcp-development/examples/create-prompt/multi-turn-debug-session.md +86 -0
  93. package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +113 -0
  94. package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +107 -0
  95. package/catalog/frontmcp-development/examples/create-resource/basic-static-resource.md +72 -0
  96. package/catalog/frontmcp-development/examples/create-resource/binary-and-multi-content.md +111 -0
  97. package/catalog/frontmcp-development/examples/create-resource/parameterized-template.md +84 -0
  98. package/catalog/frontmcp-development/examples/create-skill/basic-inline-skill.md +96 -0
  99. package/catalog/frontmcp-development/examples/create-skill/directory-based-skill.md +115 -0
  100. package/catalog/frontmcp-development/examples/create-skill/parameterized-skill.md +96 -0
  101. package/catalog/frontmcp-development/examples/create-skill-with-tools/basic-tool-orchestration.md +76 -0
  102. package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +149 -0
  103. package/catalog/frontmcp-development/examples/create-skill-with-tools/incident-response-skill.md +92 -0
  104. package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +62 -0
  105. package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +84 -0
  106. package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +93 -0
  107. package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +94 -0
  108. package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +60 -0
  109. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +104 -0
  110. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +63 -0
  111. package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +103 -0
  112. package/catalog/frontmcp-development/examples/create-workflow/basic-deploy-pipeline.md +91 -0
  113. package/catalog/frontmcp-development/examples/create-workflow/parallel-validation-pipeline.md +90 -0
  114. package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +136 -0
  115. package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +145 -0
  116. package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +124 -0
  117. package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +149 -0
  118. package/catalog/frontmcp-development/examples/official-adapters/authenticated-adapter-with-polling.md +84 -0
  119. package/catalog/frontmcp-development/examples/official-adapters/basic-openapi-adapter.md +54 -0
  120. package/catalog/frontmcp-development/examples/official-adapters/multi-api-hub-with-inline-spec.md +130 -0
  121. package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +117 -0
  122. package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +147 -0
  123. package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +104 -0
  124. package/catalog/frontmcp-development/references/create-adapter.md +14 -0
  125. package/catalog/frontmcp-development/references/create-agent-llm-config.md +14 -0
  126. package/catalog/frontmcp-development/references/create-agent.md +15 -0
  127. package/catalog/frontmcp-development/references/create-job.md +15 -0
  128. package/catalog/frontmcp-development/references/create-plugin-hooks.md +51 -0
  129. package/catalog/frontmcp-development/references/create-plugin.md +186 -11
  130. package/catalog/frontmcp-development/references/create-prompt.md +17 -0
  131. package/catalog/frontmcp-development/references/create-provider.md +14 -0
  132. package/catalog/frontmcp-development/references/create-resource.md +127 -0
  133. package/catalog/frontmcp-development/references/create-skill-with-tools.md +126 -7
  134. package/catalog/frontmcp-development/references/create-skill.md +57 -12
  135. package/catalog/frontmcp-development/references/create-tool-annotations.md +14 -0
  136. package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +15 -0
  137. package/catalog/frontmcp-development/references/create-tool.md +205 -1
  138. package/catalog/frontmcp-development/references/create-workflow.md +15 -0
  139. package/catalog/frontmcp-development/references/decorators-guide.md +155 -78
  140. package/catalog/frontmcp-development/references/official-adapters.md +31 -16
  141. package/catalog/frontmcp-development/references/official-plugins.md +62 -28
  142. package/catalog/frontmcp-extensibility/SKILL.md +103 -0
  143. package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +175 -0
  144. package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +138 -0
  145. package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +103 -0
  146. package/catalog/frontmcp-extensibility/references/vectoriadb.md +299 -0
  147. package/catalog/frontmcp-guides/SKILL.md +7 -4
  148. package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +160 -0
  149. package/catalog/frontmcp-guides/examples/example-knowledge-base/multi-app-composition.md +92 -0
  150. package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +135 -0
  151. package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +135 -0
  152. package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +148 -0
  153. package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +129 -0
  154. package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +75 -0
  155. package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +142 -0
  156. package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +74 -0
  157. package/catalog/frontmcp-guides/references/example-knowledge-base.md +15 -0
  158. package/catalog/frontmcp-guides/references/example-task-manager.md +30 -21
  159. package/catalog/frontmcp-guides/references/example-weather-api.md +18 -6
  160. package/catalog/frontmcp-observability/SKILL.md +144 -0
  161. package/catalog/frontmcp-observability/examples/structured-logging/stdout-logging.md +71 -0
  162. package/catalog/frontmcp-observability/examples/structured-logging/winston-integration.md +70 -0
  163. package/catalog/frontmcp-observability/examples/telemetry-api/agent-nested-tracing.md +86 -0
  164. package/catalog/frontmcp-observability/examples/telemetry-api/plugin-telemetry.md +93 -0
  165. package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +72 -0
  166. package/catalog/frontmcp-observability/examples/testing-observability/test-custom-spans.md +90 -0
  167. package/catalog/frontmcp-observability/examples/testing-observability/test-log-correlation.md +104 -0
  168. package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +82 -0
  169. package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +73 -0
  170. package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +74 -0
  171. package/catalog/frontmcp-observability/references/structured-logging.md +114 -0
  172. package/catalog/frontmcp-observability/references/telemetry-api.md +155 -0
  173. package/catalog/frontmcp-observability/references/testing-observability.md +169 -0
  174. package/catalog/frontmcp-observability/references/tracing-setup.md +146 -0
  175. package/catalog/frontmcp-observability/references/vendor-integrations.md +164 -0
  176. package/catalog/frontmcp-production-readiness/SKILL.md +99 -0
  177. package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +102 -0
  178. package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +104 -0
  179. package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +95 -0
  180. package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/basic-health-setup.md +81 -0
  181. package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/custom-probes.md +136 -0
  182. package/catalog/frontmcp-production-readiness/examples/production-browser/browser-bundle-config.md +93 -0
  183. package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +116 -0
  184. package/catalog/frontmcp-production-readiness/examples/production-browser/security-and-performance.md +128 -0
  185. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/binary-build-config.md +109 -0
  186. package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +132 -0
  187. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +82 -0
  188. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +107 -0
  189. package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +119 -0
  190. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +124 -0
  191. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +103 -0
  192. package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +89 -0
  193. package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +122 -0
  194. package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +107 -0
  195. package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +138 -0
  196. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/basic-sdk-lifecycle.md +85 -0
  197. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +110 -0
  198. package/catalog/frontmcp-production-readiness/examples/production-node-sdk/package-json-config.md +107 -0
  199. package/catalog/frontmcp-production-readiness/examples/production-node-server/docker-multi-stage.md +103 -0
  200. package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +87 -0
  201. package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +97 -0
  202. package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +104 -0
  203. package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +91 -0
  204. package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +78 -0
  205. package/catalog/frontmcp-production-readiness/references/common-checklist.md +175 -0
  206. package/catalog/frontmcp-production-readiness/references/health-readiness-endpoints.md +198 -0
  207. package/catalog/frontmcp-production-readiness/references/production-browser.md +56 -0
  208. package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +71 -0
  209. package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +71 -0
  210. package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +62 -0
  211. package/catalog/frontmcp-production-readiness/references/production-lambda.md +63 -0
  212. package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +76 -0
  213. package/catalog/frontmcp-production-readiness/references/production-node-server.md +71 -0
  214. package/catalog/frontmcp-production-readiness/references/production-vercel.md +62 -0
  215. package/catalog/frontmcp-setup/SKILL.md +19 -14
  216. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/bundle-presets-scaffolding.md +61 -0
  217. package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +83 -0
  218. package/catalog/frontmcp-setup/examples/multi-app-composition/local-apps-with-shared-tools.md +87 -0
  219. package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +88 -0
  220. package/catalog/frontmcp-setup/examples/multi-app-composition/remote-and-esm-apps.md +81 -0
  221. package/catalog/frontmcp-setup/examples/nx-workflow/build-test-affected.md +77 -0
  222. package/catalog/frontmcp-setup/examples/nx-workflow/multi-server-deployment.md +93 -0
  223. package/catalog/frontmcp-setup/examples/nx-workflow/scaffold-and-generate.md +62 -0
  224. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-generator-scaffolding.md +73 -0
  225. package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +85 -0
  226. package/catalog/frontmcp-setup/examples/project-structure-nx/shared-library-usage.md +89 -0
  227. package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +64 -0
  228. package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +111 -0
  229. package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +73 -0
  230. package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +89 -0
  231. package/catalog/frontmcp-setup/examples/readme-guide/vercel-deployment-readme.md +90 -0
  232. package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +99 -0
  233. package/catalog/frontmcp-setup/examples/setup-project/cli-scaffold-with-flags.md +77 -0
  234. package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +89 -0
  235. package/catalog/frontmcp-setup/examples/setup-redis/docker-redis-local-dev.md +88 -0
  236. package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +78 -0
  237. package/catalog/frontmcp-setup/examples/setup-redis/vercel-kv-serverless.md +78 -0
  238. package/catalog/frontmcp-setup/examples/setup-sqlite/basic-sqlite-setup.md +75 -0
  239. package/catalog/frontmcp-setup/examples/setup-sqlite/encrypted-sqlite-storage.md +55 -0
  240. package/catalog/frontmcp-setup/examples/setup-sqlite/unix-socket-daemon.md +70 -0
  241. package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +33 -9
  242. package/catalog/frontmcp-setup/references/multi-app-composition.md +15 -0
  243. package/catalog/frontmcp-setup/references/nx-workflow.md +15 -0
  244. package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -0
  245. package/catalog/frontmcp-setup/references/project-structure-standalone.md +15 -0
  246. package/catalog/frontmcp-setup/references/readme-guide.md +235 -0
  247. package/catalog/frontmcp-setup/references/setup-project.md +16 -1
  248. package/catalog/frontmcp-setup/references/setup-redis.md +15 -0
  249. package/catalog/frontmcp-setup/references/setup-sqlite.md +15 -0
  250. package/catalog/frontmcp-testing/SKILL.md +41 -27
  251. package/catalog/frontmcp-testing/examples/setup-testing/fixture-based-e2e-test.md +70 -0
  252. package/catalog/frontmcp-testing/examples/setup-testing/jest-config-with-coverage.md +59 -0
  253. package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +115 -0
  254. package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +78 -0
  255. package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +88 -0
  256. package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +71 -0
  257. package/catalog/frontmcp-testing/examples/test-browser-build/browser-bundle-validation.md +58 -0
  258. package/catalog/frontmcp-testing/examples/test-browser-build/playwright-browser-test.md +69 -0
  259. package/catalog/frontmcp-testing/examples/test-cli-binary/binary-startup-test.md +77 -0
  260. package/catalog/frontmcp-testing/examples/test-cli-binary/js-bundle-import-test.md +56 -0
  261. package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +74 -0
  262. package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +79 -0
  263. package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +67 -0
  264. package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +72 -0
  265. package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +73 -0
  266. package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +69 -0
  267. package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +82 -0
  268. package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +92 -0
  269. package/catalog/frontmcp-testing/references/setup-testing.md +17 -0
  270. package/catalog/frontmcp-testing/references/test-auth.md +15 -0
  271. package/catalog/frontmcp-testing/references/test-browser-build.md +14 -0
  272. package/catalog/frontmcp-testing/references/test-cli-binary.md +14 -0
  273. package/catalog/frontmcp-testing/references/test-direct-client.md +14 -0
  274. package/catalog/frontmcp-testing/references/test-e2e-handler.md +15 -0
  275. package/catalog/frontmcp-testing/references/test-tool-unit.md +15 -0
  276. package/catalog/skills-manifest.json +2849 -32
  277. package/package.json +2 -2
  278. package/src/index.d.ts +1 -1
  279. package/src/index.js.map +1 -1
  280. package/src/loader.js +0 -1
  281. package/src/loader.js.map +1 -1
  282. package/src/manifest.d.ts +36 -1
  283. package/src/manifest.js +6 -1
  284. package/src/manifest.js.map +1 -1
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: tool-with-di-and-errors
3
+ reference: create-tool
4
+ level: intermediate
5
+ description: 'A tool that resolves a database service via DI and uses `this.fail()` for business-logic errors.'
6
+ tags: [development, database, tool, di, errors]
7
+ features:
8
+ - 'Defining a typed DI token with `Token<T>` and resolving it via `this.get()`'
9
+ - 'Using `this.fail()` with `ResourceNotFoundError` for MCP-compliant error responses'
10
+ - 'Letting infrastructure errors (database failures) propagate naturally to the framework'
11
+ - 'Registering both the provider and tool in the same `@App`'
12
+ ---
13
+
14
+ # Tool with Dependency Injection and Error Handling
15
+
16
+ A tool that resolves a database service via DI and uses `this.fail()` for business-logic errors.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/apps/main/tokens.ts
22
+ import type { Token } from '@frontmcp/di';
23
+
24
+ export interface DatabaseService {
25
+ query(sql: string, params: unknown[]): Promise<unknown[]>;
26
+ }
27
+
28
+ export const DATABASE: Token<DatabaseService> = Symbol('database');
29
+ ```
30
+
31
+ ```typescript
32
+ // src/apps/main/tools/delete-record.tool.ts
33
+ import { Tool, ToolContext, ResourceNotFoundError } from '@frontmcp/sdk';
34
+ import { z } from 'zod';
35
+ import { DATABASE } from '../tokens';
36
+
37
+ @Tool({
38
+ name: 'delete_record',
39
+ description: 'Delete a record by ID',
40
+ inputSchema: {
41
+ id: z.string().uuid().describe('Record UUID'),
42
+ },
43
+ outputSchema: {
44
+ message: z.string(),
45
+ },
46
+ })
47
+ class DeleteRecordTool extends ToolContext {
48
+ async execute(input: { id: string }): Promise<{ message: string }> {
49
+ const db = this.get(DATABASE);
50
+ const rows = await db.query('SELECT * FROM records WHERE id = $1', [input.id]);
51
+
52
+ if (rows.length === 0) {
53
+ this.fail(new ResourceNotFoundError(`Record ${input.id}`));
54
+ }
55
+
56
+ await db.query('DELETE FROM records WHERE id = $1', [input.id]);
57
+ return { message: `Record ${input.id} deleted successfully` };
58
+ }
59
+ }
60
+ ```
61
+
62
+ ```typescript
63
+ // src/apps/main/index.ts
64
+ import { App } from '@frontmcp/sdk';
65
+
66
+ @App({
67
+ name: 'main',
68
+ providers: [DatabaseProvider],
69
+ tools: [DeleteRecordTool],
70
+ })
71
+ class MainApp {}
72
+ ```
73
+
74
+ ## What This Demonstrates
75
+
76
+ - Defining a typed DI token with `Token<T>` and resolving it via `this.get()`
77
+ - Using `this.fail()` with `ResourceNotFoundError` for MCP-compliant error responses
78
+ - Letting infrastructure errors (database failures) propagate naturally to the framework
79
+ - Registering both the provider and tool in the same `@App`
80
+
81
+ ## Related
82
+
83
+ - See `create-tool` for all context methods and error handling patterns
84
+ - See `create-provider` for how to implement the `DatabaseProvider` class
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: tool-with-rate-limiting-and-progress
3
+ reference: create-tool
4
+ level: advanced
5
+ description: 'A batch processing tool that uses rate limiting, concurrency control, progress notifications, and annotations.'
6
+ tags: [development, throttle, tool, rate, limiting, progress]
7
+ features:
8
+ - 'Configuring `rateLimit`, `concurrency`, and `timeout` for throttling protection'
9
+ - 'Sending progress updates to the client with `this.respondProgress(value, total)`'
10
+ - 'Using `this.mark(stage)` for execution stage tracking and debugging'
11
+ - 'Sending log-level notifications with `this.notify(message, level)`'
12
+ - 'Setting tool `annotations` to communicate behavioral hints to clients'
13
+ ---
14
+
15
+ # Tool with Rate Limiting, Progress, and Annotations
16
+
17
+ A batch processing tool that uses rate limiting, concurrency control, progress notifications, and annotations.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/apps/main/tools/batch-process.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+
26
+ @Tool({
27
+ name: 'batch_process',
28
+ description: 'Process a batch of items with progress tracking',
29
+ inputSchema: {
30
+ items: z.array(z.string()).min(1).describe('Items to process'),
31
+ },
32
+ outputSchema: {
33
+ processed: z.number(),
34
+ results: z.array(z.string()),
35
+ },
36
+ annotations: {
37
+ title: 'Batch Processor',
38
+ readOnlyHint: false,
39
+ idempotentHint: true,
40
+ openWorldHint: false,
41
+ },
42
+ rateLimit: { maxRequests: 10, windowMs: 60_000 },
43
+ concurrency: { maxConcurrent: 2 },
44
+ timeout: { executeMs: 30_000 },
45
+ })
46
+ class BatchProcessTool extends ToolContext {
47
+ async execute(input: { items: string[] }): Promise<{ processed: number; results: string[] }> {
48
+ this.mark('validation');
49
+ if (input.items.some((item) => item.trim() === '')) {
50
+ this.fail(new Error('Items must not be empty strings'));
51
+ }
52
+
53
+ this.mark('processing');
54
+ const results: string[] = [];
55
+ for (let i = 0; i < input.items.length; i++) {
56
+ await this.respondProgress(i + 1, input.items.length);
57
+ const result = await this.processItem(input.items[i]);
58
+ results.push(result);
59
+ }
60
+
61
+ this.mark('complete');
62
+ await this.notify(`Processed ${results.length} items`, 'info');
63
+ return { processed: results.length, results };
64
+ }
65
+
66
+ private async processItem(item: string): Promise<string> {
67
+ return `processed:${item}`;
68
+ }
69
+ }
70
+ ```
71
+
72
+ ```typescript
73
+ // src/apps/main/index.ts
74
+ import { App } from '@frontmcp/sdk';
75
+
76
+ @App({
77
+ name: 'main',
78
+ tools: [BatchProcessTool],
79
+ })
80
+ class MainApp {}
81
+ ```
82
+
83
+ ## What This Demonstrates
84
+
85
+ - Configuring `rateLimit`, `concurrency`, and `timeout` for throttling protection
86
+ - Sending progress updates to the client with `this.respondProgress(value, total)`
87
+ - Using `this.mark(stage)` for execution stage tracking and debugging
88
+ - Sending log-level notifications with `this.notify(message, level)`
89
+ - Setting tool `annotations` to communicate behavioral hints to clients
90
+
91
+ ## Related
92
+
93
+ - See `create-tool` for all annotation fields, elicitation, and auth provider patterns
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: destructive-delete-tool
3
+ reference: create-tool-annotations
4
+ level: intermediate
5
+ description: 'Demonstrates annotating a tool that deletes data, enabling MCP clients to warn users before execution.'
6
+ tags: [development, elicitation, tool, annotations, destructive, delete]
7
+ features:
8
+ - 'Setting `destructiveHint: true` on the delete tool so MCP clients can trigger confirmation warnings'
9
+ - 'Setting `idempotentHint: true` on the delete tool because deleting the same user twice produces the same outcome'
10
+ - 'Setting `openWorldHint: true` on the email tool because it interacts with an external SMTP service'
11
+ - 'Setting `idempotentHint: false` on the email tool because each call sends a new email'
12
+ - 'How different annotation combinations express different behavioral contracts'
13
+ ---
14
+
15
+ # Destructive Delete Tool with Annotations
16
+
17
+ Demonstrates annotating a tool that deletes data, enabling MCP clients to warn users before execution.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/tools/delete-user.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+
26
+ @Tool({
27
+ name: 'delete_user',
28
+ description: 'Permanently delete a user account and all associated data',
29
+ inputSchema: {
30
+ userId: z.string().describe('ID of the user to delete'),
31
+ confirm: z.boolean().describe('Must be true to confirm deletion'),
32
+ },
33
+ annotations: {
34
+ title: 'Delete User Account',
35
+ readOnlyHint: false,
36
+ destructiveHint: true,
37
+ idempotentHint: true,
38
+ openWorldHint: false,
39
+ },
40
+ })
41
+ class DeleteUserTool extends ToolContext {
42
+ async execute(input: { userId: string; confirm: boolean }) {
43
+ if (!input.confirm) {
44
+ return { deleted: false, reason: 'Confirmation required' };
45
+ }
46
+ const db = this.get(DatabaseToken);
47
+ await db.deleteUser(input.userId);
48
+ return { deleted: true, userId: input.userId };
49
+ }
50
+ }
51
+ ```
52
+
53
+ ```typescript
54
+ // src/tools/send-email.tool.ts
55
+ import { Tool, ToolContext } from '@frontmcp/sdk';
56
+ import { z } from 'zod';
57
+
58
+ @Tool({
59
+ name: 'send_email',
60
+ description: 'Send an email to a recipient via external SMTP service',
61
+ inputSchema: {
62
+ to: z.string().email().describe('Recipient email address'),
63
+ subject: z.string().describe('Email subject'),
64
+ body: z.string().describe('Email body text'),
65
+ },
66
+ annotations: {
67
+ title: 'Send Email',
68
+ readOnlyHint: false,
69
+ destructiveHint: false,
70
+ idempotentHint: false,
71
+ openWorldHint: true,
72
+ },
73
+ })
74
+ class SendEmailTool extends ToolContext {
75
+ async execute(input: { to: string; subject: string; body: string }) {
76
+ const mailer = this.get(MailerToken);
77
+ const result = await mailer.send(input.to, input.subject, input.body);
78
+ return { sent: true, messageId: result.id };
79
+ }
80
+ }
81
+ ```
82
+
83
+ ## What This Demonstrates
84
+
85
+ - Setting `destructiveHint: true` on the delete tool so MCP clients can trigger confirmation warnings
86
+ - Setting `idempotentHint: true` on the delete tool because deleting the same user twice produces the same outcome
87
+ - Setting `openWorldHint: true` on the email tool because it interacts with an external SMTP service
88
+ - Setting `idempotentHint: false` on the email tool because each call sends a new email
89
+ - How different annotation combinations express different behavioral contracts
90
+
91
+ ## Related
92
+
93
+ - See `create-tool-annotations` for all annotation fields and their default values
94
+ - See `decorators-guide` for the full `@Tool` decorator field reference
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: readonly-query-tool
3
+ reference: create-tool-annotations
4
+ level: basic
5
+ description: 'Demonstrates annotating a tool that only reads data, signaling to MCP clients that it has no side effects and is safe to retry.'
6
+ tags: [development, database, local, tool, annotations, readonly]
7
+ features:
8
+ - 'Setting `readOnlyHint: true` to indicate the tool performs no mutations'
9
+ - 'Setting `destructiveHint: false` to tell clients no data will be deleted or overwritten'
10
+ - 'Setting `idempotentHint: true` because repeated calls with the same input produce the same result'
11
+ - 'Setting `openWorldHint: false` because the tool only accesses local database data'
12
+ - 'Using `title` to provide a human-friendly display name for MCP client UIs'
13
+ ---
14
+
15
+ # Read-Only Query Tool with Annotations
16
+
17
+ Demonstrates annotating a tool that only reads data, signaling to MCP clients that it has no side effects and is safe to retry.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/tools/search-users.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+
26
+ @Tool({
27
+ name: 'search_users',
28
+ description: 'Search for users by name or email',
29
+ inputSchema: {
30
+ query: z.string().describe('Search query'),
31
+ limit: z.number().optional().default(10),
32
+ },
33
+ annotations: {
34
+ title: 'Search Users',
35
+ readOnlyHint: true,
36
+ destructiveHint: false,
37
+ idempotentHint: true,
38
+ openWorldHint: false,
39
+ },
40
+ })
41
+ class SearchUsersTool extends ToolContext {
42
+ async execute(input: { query: string; limit: number }) {
43
+ const db = this.get(DatabaseToken);
44
+ const users = await db.searchUsers(input.query, input.limit);
45
+ return { users };
46
+ }
47
+ }
48
+ ```
49
+
50
+ ## What This Demonstrates
51
+
52
+ - Setting `readOnlyHint: true` to indicate the tool performs no mutations
53
+ - Setting `destructiveHint: false` to tell clients no data will be deleted or overwritten
54
+ - Setting `idempotentHint: true` because repeated calls with the same input produce the same result
55
+ - Setting `openWorldHint: false` because the tool only accesses local database data
56
+ - Using `title` to provide a human-friendly display name for MCP client UIs
57
+
58
+ ## Related
59
+
60
+ - See `create-tool-annotations` for the full fields reference and default values
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: primitive-and-media-outputs
3
+ reference: create-tool-output-schema-types
4
+ level: intermediate
5
+ description: 'Demonstrates using primitive string literals and media types as `outputSchema` for tools that return plain text, images, or multi-content arrays.'
6
+ tags: [development, output-schema, tool, output, schema, types]
7
+ features:
8
+ - "Using `'string'` literal to return plain text output"
9
+ - "Using `'image'` literal to return base64 image data"
10
+ - "Using `['string', 'image']` array to return multi-content (text plus image) in a single response"
11
+ - "Other available primitives: `'number'`, `'boolean'`, `'date'`"
12
+ - "Other available media types: `'audio'`, `'resource'`, `'resource_link'`"
13
+ ---
14
+
15
+ # Primitive Literal and Media Type Output Schemas
16
+
17
+ Demonstrates using primitive string literals and media types as `outputSchema` for tools that return plain text, images, or multi-content arrays.
18
+
19
+ ## Code
20
+
21
+ ```typescript
22
+ // src/tools/summarize.tool.ts
23
+ import { Tool, ToolContext } from '@frontmcp/sdk';
24
+ import { z } from 'zod';
25
+
26
+ // Primitive literal: returns plain text
27
+ @Tool({
28
+ name: 'summarize_text',
29
+ description: 'Summarize a long text into a short paragraph',
30
+ inputSchema: {
31
+ text: z.string().describe('The text to summarize'),
32
+ },
33
+ outputSchema: 'string',
34
+ })
35
+ class SummarizeTextTool extends ToolContext {
36
+ async execute(input: { text: string }) {
37
+ const summary = await this.get(LlmService).summarize(input.text);
38
+ return summary;
39
+ }
40
+ }
41
+ ```
42
+
43
+ ```typescript
44
+ // src/tools/generate-chart.tool.ts
45
+ import { Tool, ToolContext } from '@frontmcp/sdk';
46
+ import { z } from 'zod';
47
+
48
+ // Media type: returns base64 image data
49
+ @Tool({
50
+ name: 'generate_chart',
51
+ description: 'Generate a chart image from data points',
52
+ inputSchema: {
53
+ data: z.array(z.object({ label: z.string(), value: z.number() })),
54
+ chartType: z.enum(['bar', 'line', 'pie']),
55
+ },
56
+ outputSchema: 'image',
57
+ })
58
+ class GenerateChartTool extends ToolContext {
59
+ async execute(input: { data: Array<{ label: string; value: number }>; chartType: string }) {
60
+ const chartService = this.get(ChartService);
61
+ const imageBase64 = await chartService.render(input.data, input.chartType);
62
+ return imageBase64;
63
+ }
64
+ }
65
+ ```
66
+
67
+ ```typescript
68
+ // src/tools/analyze-document.tool.ts
69
+ import { Tool, ToolContext } from '@frontmcp/sdk';
70
+ import { z } from 'zod';
71
+
72
+ // Multi-content array: returns text + image
73
+ @Tool({
74
+ name: 'analyze_document',
75
+ description: 'Analyze a document and return summary with visual highlights',
76
+ inputSchema: {
77
+ documentId: z.string().describe('Document ID to analyze'),
78
+ },
79
+ outputSchema: ['string', 'image'],
80
+ })
81
+ class AnalyzeDocumentTool extends ToolContext {
82
+ async execute(input: { documentId: string }) {
83
+ const doc = this.get(DocumentService);
84
+ const analysis = await doc.analyze(input.documentId);
85
+ return {
86
+ text: analysis.summary,
87
+ image: analysis.highlightImageBase64,
88
+ };
89
+ }
90
+ }
91
+ ```
92
+
93
+ ## What This Demonstrates
94
+
95
+ - Using `'string'` literal to return plain text output
96
+ - Using `'image'` literal to return base64 image data
97
+ - Using `['string', 'image']` array to return multi-content (text plus image) in a single response
98
+ - Other available primitives: `'number'`, `'boolean'`, `'date'`
99
+ - Other available media types: `'audio'`, `'resource'`, `'resource_link'`
100
+
101
+ ## Related
102
+
103
+ - See `create-tool-output-schema-types` for the complete list of supported output schema types
104
+ - See `decorators-guide` for the full `@Tool` decorator field reference
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: zod-raw-shape-output
3
+ reference: create-tool-output-schema-types
4
+ level: basic
5
+ description: 'Demonstrates the recommended approach of using a Zod raw shape as `outputSchema` for structured, validated JSON output.'
6
+ tags: [development, codecall, output-schema, tool, output, schema]
7
+ features:
8
+ - 'Using a Zod raw shape (plain object with Zod types) as `outputSchema` for structured output'
9
+ - 'The output is validated at runtime against the schema before being returned to the client'
10
+ - 'This is the recommended pattern for CodeCall compatibility and data leak prevention'
11
+ - 'The `execute()` return type is automatically inferred from the output schema'
12
+ ---
13
+
14
+ # Zod Raw Shape Output Schema
15
+
16
+ Demonstrates the recommended approach of using a Zod raw shape as `outputSchema` for structured, validated JSON output.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/tools/get-user-profile.tool.ts
22
+ import { Tool, ToolContext } from '@frontmcp/sdk';
23
+ import { z } from 'zod';
24
+
25
+ @Tool({
26
+ name: 'get_user_profile',
27
+ description: 'Retrieve a user profile by ID',
28
+ inputSchema: {
29
+ userId: z.string().describe('The user ID to look up'),
30
+ },
31
+ outputSchema: {
32
+ name: z.string(),
33
+ email: z.string().email(),
34
+ age: z.number(),
35
+ roles: z.array(z.string()),
36
+ active: z.boolean(),
37
+ },
38
+ })
39
+ class GetUserProfileTool extends ToolContext {
40
+ async execute(input: { userId: string }) {
41
+ const db = this.get(DatabaseToken);
42
+ const user = await db.findUser(input.userId);
43
+ return {
44
+ name: user.name,
45
+ email: user.email,
46
+ age: user.age,
47
+ roles: user.roles,
48
+ active: user.active,
49
+ };
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## What This Demonstrates
55
+
56
+ - Using a Zod raw shape (plain object with Zod types) as `outputSchema` for structured output
57
+ - The output is validated at runtime against the schema before being returned to the client
58
+ - This is the recommended pattern for CodeCall compatibility and data leak prevention
59
+ - The `execute()` return type is automatically inferred from the output schema
60
+
61
+ ## Related
62
+
63
+ - See `create-tool-output-schema-types` for all supported output schema formats
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: zod-schema-advanced-output
3
+ reference: create-tool-output-schema-types
4
+ level: advanced
5
+ description: 'Demonstrates using full Zod schema objects (not raw shapes) as `outputSchema`, including `z.object()`, `z.array()`, `z.union()`, and `z.discriminatedUnion()`.'
6
+ tags: [development, output-schema, tool, output, schema, types]
7
+ features:
8
+ - 'Using `z.object()` for structured output with nested arrays and nullable fields'
9
+ - 'Using `z.discriminatedUnion()` to return different output shapes based on a discriminant field'
10
+ - 'Full Zod schemas provide the same validation as raw shapes but support more complex types'
11
+ - 'Output is validated at runtime -- mismatched return values trigger validation errors'
12
+ ---
13
+
14
+ # Advanced Zod Schema Output Types
15
+
16
+ Demonstrates using full Zod schema objects (not raw shapes) as `outputSchema`, including `z.object()`, `z.array()`, `z.union()`, and `z.discriminatedUnion()`.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/tools/list-products.tool.ts
22
+ import { Tool, ToolContext } from '@frontmcp/sdk';
23
+ import { z } from 'zod';
24
+
25
+ // z.object() -- structured object output
26
+ @Tool({
27
+ name: 'get_order_status',
28
+ description: 'Get the current status of an order',
29
+ inputSchema: {
30
+ orderId: z.string(),
31
+ },
32
+ outputSchema: z.object({
33
+ orderId: z.string(),
34
+ status: z.enum(['pending', 'processing', 'shipped', 'delivered']),
35
+ estimatedDelivery: z.string().nullable(),
36
+ items: z.array(
37
+ z.object({
38
+ name: z.string(),
39
+ quantity: z.number(),
40
+ }),
41
+ ),
42
+ }),
43
+ })
44
+ class GetOrderStatusTool extends ToolContext {
45
+ async execute(input: { orderId: string }) {
46
+ const order = await this.get(OrderService).getStatus(input.orderId);
47
+ return {
48
+ orderId: order.id,
49
+ status: order.status,
50
+ estimatedDelivery: order.estimatedDelivery,
51
+ items: order.items.map((i) => ({ name: i.name, quantity: i.quantity })),
52
+ };
53
+ }
54
+ }
55
+ ```
56
+
57
+ ```typescript
58
+ // src/tools/search-catalog.tool.ts
59
+ import { Tool, ToolContext } from '@frontmcp/sdk';
60
+ import { z } from 'zod';
61
+
62
+ // z.discriminatedUnion() -- different shapes based on a type field
63
+ const ProductResult = z.discriminatedUnion('type', [
64
+ z.object({
65
+ type: z.literal('physical'),
66
+ name: z.string(),
67
+ weight: z.number(),
68
+ dimensions: z.object({ width: z.number(), height: z.number(), depth: z.number() }),
69
+ }),
70
+ z.object({
71
+ type: z.literal('digital'),
72
+ name: z.string(),
73
+ downloadUrl: z.string(),
74
+ fileSizeMb: z.number(),
75
+ }),
76
+ ]);
77
+
78
+ @Tool({
79
+ name: 'get_product',
80
+ description: 'Retrieve product details by ID',
81
+ inputSchema: {
82
+ productId: z.string(),
83
+ },
84
+ outputSchema: ProductResult,
85
+ })
86
+ class GetProductTool extends ToolContext {
87
+ async execute(input: { productId: string }) {
88
+ const product = await this.get(CatalogService).findById(input.productId);
89
+ return product;
90
+ }
91
+ }
92
+ ```
93
+
94
+ ## What This Demonstrates
95
+
96
+ - Using `z.object()` for structured output with nested arrays and nullable fields
97
+ - Using `z.discriminatedUnion()` to return different output shapes based on a discriminant field
98
+ - Full Zod schemas provide the same validation as raw shapes but support more complex types
99
+ - Output is validated at runtime -- mismatched return values trigger validation errors
100
+
101
+ ## Related
102
+
103
+ - See `create-tool-output-schema-types` for all supported output schema formats including primitives and media types
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: basic-deploy-pipeline
3
+ reference: create-workflow
4
+ level: basic
5
+ description: 'A linear workflow that builds, tests, and deploys a service with step dependencies and dynamic input.'
6
+ tags: [development, workflow, pipeline]
7
+ features:
8
+ - 'Defining a workflow with `@Workflow` decorator and sequential `steps`'
9
+ - 'Using `dependsOn` to establish step execution order'
10
+ - 'Passing dynamic input from a previous step using the callback form `(steps) => ({...})`'
11
+ - 'Registering both jobs and workflows in `@App` with jobs enabled'
12
+ ---
13
+
14
+ # Basic Deploy Pipeline Workflow
15
+
16
+ A linear workflow that builds, tests, and deploys a service with step dependencies and dynamic input.
17
+
18
+ ## Code
19
+
20
+ ```typescript
21
+ // src/workflows/deploy-pipeline.workflow.ts
22
+ import { Workflow } from '@frontmcp/sdk';
23
+
24
+ @Workflow({
25
+ name: 'deploy-pipeline',
26
+ description: 'Build, test, and deploy a service',
27
+ steps: [
28
+ {
29
+ id: 'build',
30
+ jobName: 'build-project',
31
+ input: { target: 'production', optimize: true },
32
+ },
33
+ {
34
+ id: 'test',
35
+ jobName: 'run-tests',
36
+ input: { suite: 'all', coverage: true },
37
+ dependsOn: ['build'],
38
+ },
39
+ {
40
+ id: 'deploy',
41
+ jobName: 'deploy-to-env',
42
+ input: (steps) => ({
43
+ artifact: steps.get('build').outputs.artifactUrl,
44
+ environment: 'production',
45
+ }),
46
+ dependsOn: ['test'],
47
+ },
48
+ ],
49
+ })
50
+ class DeployPipeline {}
51
+ ```
52
+
53
+ ```typescript
54
+ // src/server.ts
55
+ import { FrontMcp, App } from '@frontmcp/sdk';
56
+
57
+ @App({
58
+ name: 'pipeline-app',
59
+ jobs: [BuildProjectJob, RunTestsJob, DeployToEnvJob],
60
+ workflows: [DeployPipeline],
61
+ })
62
+ class PipelineApp {}
63
+
64
+ @FrontMcp({
65
+ info: { name: 'pipeline-server', version: '1.0.0' },
66
+ apps: [PipelineApp],
67
+ jobs: {
68
+ enabled: true,
69
+ store: {
70
+ redis: {
71
+ provider: 'redis',
72
+ host: 'localhost',
73
+ port: 6379,
74
+ keyPrefix: 'mcp:jobs:',
75
+ },
76
+ },
77
+ },
78
+ })
79
+ class PipelineServer {}
80
+ ```
81
+
82
+ ## What This Demonstrates
83
+
84
+ - Defining a workflow with `@Workflow` decorator and sequential `steps`
85
+ - Using `dependsOn` to establish step execution order
86
+ - Passing dynamic input from a previous step using the callback form `(steps) => ({...})`
87
+ - Registering both jobs and workflows in `@App` with jobs enabled
88
+
89
+ ## Related
90
+
91
+ - See `create-workflow` for the full API reference including triggers, conditions, and error handling