@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
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-skill-with-tools
3
+ description: Create skills that combine structured instructions with MCP tool references for orchestration
4
+ ---
5
+
1
6
  # Creating a Skill with Tools
2
7
 
3
8
  Skills are knowledge and workflow guides that help LLMs accomplish multi-step tasks using available MCP tools. Unlike tools (which execute actions directly) or agents (which run autonomous LLM loops), skills provide structured instructions, tool references, and context that the AI client uses to orchestrate tool calls on its own.
@@ -341,6 +346,44 @@ Use `hideFromDiscovery: true` to register a skill that is not listed in discover
341
346
  class AdminMaintenanceSkill extends SkillContext {}
342
347
  ```
343
348
 
349
+ ## Agent Skills Spec Fields
350
+
351
+ Skills support additional metadata fields from the Anthropic Agent Skills specification:
352
+
353
+ ```typescript
354
+ @Skill({
355
+ name: 'deploy-to-prod',
356
+ description: 'Production deployment workflow',
357
+ instructions: { file: './deploy-prod.md' },
358
+ tools: [BuildTool, DeployTool, HealthCheckTool],
359
+ priority: 10, // Higher = earlier in search results
360
+ license: 'MIT', // License identifier
361
+ compatibility: 'Node.js 24+, Docker', // Environment requirements (max 500 chars)
362
+ allowedTools: 'Read Edit Bash(git status)', // Pre-approved tools (space-delimited)
363
+ specMetadata: {
364
+ // Arbitrary key-value metadata
365
+ author: 'platform-team',
366
+ version: '2.0.0',
367
+ },
368
+ resources: {
369
+ // Bundled resource directories
370
+ scripts: './scripts', // Helper scripts
371
+ references: './references', // Reference documents
372
+ assets: './assets', // Static assets
373
+ },
374
+ })
375
+ class DeployToProdSkill extends SkillContext {}
376
+ ```
377
+
378
+ | Field | Description |
379
+ | --------------- | ---------------------------------------------------------------- |
380
+ | `priority` | Search ranking weight; higher = earlier (default: `0`) |
381
+ | `license` | License identifier (e.g., `'MIT'`, `'Apache-2.0'`) |
382
+ | `compatibility` | Environment requirements (max 500 chars) |
383
+ | `allowedTools` | Space-delimited pre-approved tool names for the skill |
384
+ | `specMetadata` | Arbitrary `Record<string, string>` map (Agent Skills `metadata`) |
385
+ | `resources` | Bundled dirs: `{ scripts?, references?, assets? }` paths |
386
+
344
387
  ## Function-Style Builder
345
388
 
346
389
  For skills that do not need a class, use the `skill()` function builder:
@@ -575,15 +618,81 @@ class AuditApp {}
575
618
  class AuditServer {}
576
619
  ```
577
620
 
621
+ ## CodeCall Compatibility
622
+
623
+ When the `CodeCallPlugin` is active in `codecall_only` mode, all tools registered on the server are hidden from `list_tools`. The AI client only sees the three CodeCall meta-tools (`codecall:search`, `codecall:describe`, `codecall:execute`). This means skill instructions that reference tool names directly (e.g., "Use the `build_project` tool") become misleading -- the AI cannot call those tools because they do not appear in the tool listing.
624
+
625
+ ### When This Matters
626
+
627
+ This is only relevant when the server initializes CodeCall in `codecall_only` mode:
628
+
629
+ ```typescript
630
+ CodeCallPlugin.init({ mode: 'codecall_only' });
631
+ ```
632
+
633
+ With `codecall_opt_in` or `metadata_driven` modes, tools remain visible in `list_tools` alongside the CodeCall meta-tools. In those modes, standard tool-referencing instructions continue to work without changes.
634
+
635
+ ### Writing Dual-Mode Instructions
636
+
637
+ Write skill instructions that work regardless of whether CodeCall is active. Instead of referencing tool names as direct calls, instruct the AI to use the search-describe-execute pattern:
638
+
639
+ ```markdown
640
+ ## Step 1: Find Available Tools
641
+
642
+ Search for tools related to your task using codecall:search.
643
+ Query: ["build project", "run tests", "deploy"]
644
+
645
+ ## Step 2: Describe Tool Interfaces
646
+
647
+ Once you find matching tools, use codecall:describe to understand their input schemas.
648
+
649
+ ## Step 3: Execute
650
+
651
+ Use codecall:execute with an AgentScript that calls the tools:
652
+ const build = await callTool('build_project', { target: 'production' });
653
+ const tests = await callTool('run_tests', { suite: 'e2e' });
654
+ ```
655
+
656
+ ### Supporting Both Direct and CodeCall Workflows
657
+
658
+ If you want the skill to work with and without CodeCall, list the tool names in the `tools` array (so they are associated with the skill in metadata) AND include instructions for both direct calls and the CodeCall workflow. This way:
659
+
660
+ - In standard mode, the AI sees the tools in `list_tools` and can call them directly using the tool names from the `tools` array.
661
+ - In `codecall_only` mode, the AI follows the search-describe-execute instructions to discover and invoke the same tools through CodeCall.
662
+
663
+ ```typescript
664
+ @Skill({
665
+ name: 'deploy-service',
666
+ description: 'Deploy a service through the pipeline',
667
+ instructions: `# Deploy Service
668
+
669
+ ## Finding the Tools
670
+ If tools are not directly visible, search for them:
671
+ Use codecall:search with query ["build project", "run tests", "deploy to environment"].
672
+ Then use codecall:describe on each result to confirm the input schema.
673
+
674
+ ## Step 1: Build
675
+ Call build_project with the service name and target environment.
676
+ If using CodeCall: codecall:execute with callTool('build_project', { ... }).
677
+
678
+ ## Step 2: Test
679
+ Call run_tests with the test suite name.
680
+ If using CodeCall: codecall:execute with callTool('run_tests', { ... }).`,
681
+ tools: [BuildProjectTool, RunTestsTool, DeployToEnvTool],
682
+ })
683
+ class DeployServiceSkill extends SkillContext {}
684
+ ```
685
+
578
686
  ## Common Patterns
579
687
 
580
- | Pattern | Correct | Incorrect | Why |
581
- | ------------------ | ------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
582
- | Tool references | `tools: [BuildTool, 'run_tests', { name: 'deploy', purpose: '...', required: true }]` | `tools: [{ class: BuildTool }]` (object with `class` key) | The `tools` array accepts class refs, strings, or `{ name, purpose, required }` objects only |
583
- | Tool validation | `toolValidation: 'strict'` for production skills | Omitting `toolValidation` for critical workflows | Default is `'warn'`; production skills should fail fast on missing tools with `'strict'` |
584
- | Instruction source | `instructions: { file: './skills/deploy.md' }` for long content | Inlining hundreds of lines in the decorator string | File-based instructions keep decorator metadata readable and instructions maintainable |
585
- | Skill visibility | `visibility: 'both'` (default) for public skills | Setting `visibility: 'mcp'` when HTTP discovery is also needed | Skills with `'mcp'` visibility are hidden from `/llm.txt` and `/skills` HTTP endpoints |
586
- | Parameter types | `parameters: [{ name: 'env', type: 'string', required: true }]` | `parameters: { env: 'string' }` (plain object shape) | Parameters must be an array of `{ name, description, type, required?, default? }` objects |
688
+ | Pattern | Correct | Incorrect | Why |
689
+ | ---------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
690
+ | Tool references | `tools: [BuildTool, 'run_tests', { name: 'deploy', purpose: '...', required: true }]` | `tools: [{ class: BuildTool }]` (object with `class` key) | The `tools` array accepts class refs, strings, or `{ name, purpose, required }` objects only |
691
+ | Tool validation | `toolValidation: 'strict'` for production skills | Omitting `toolValidation` for critical workflows | Default is `'warn'`; production skills should fail fast on missing tools with `'strict'` |
692
+ | Instruction source | `instructions: { file: './skills/deploy.md' }` for long content | Inlining hundreds of lines in the decorator string | File-based instructions keep decorator metadata readable and instructions maintainable |
693
+ | Skill visibility | `visibility: 'both'` (default) for public skills | Setting `visibility: 'mcp'` when HTTP discovery is also needed | Skills with `'mcp'` visibility are hidden from `/llm.txt` and `/skills` HTTP endpoints |
694
+ | Parameter types | `parameters: [{ name: 'env', type: 'string', required: true }]` | `parameters: { env: 'string' }` (plain object shape) | Parameters must be an array of `{ name, description, type, required?, default? }` objects |
695
+ | CodeCall compatibility | List tools AND include codecall:search/execute instructions | Only listing tools by name | When CodeCall hides tools, AI can't find them without search instructions |
587
696
 
588
697
  ## Verification Checklist
589
698
 
@@ -618,6 +727,16 @@ class AuditServer {}
618
727
  | Instructions are empty at runtime | `{ file: './path.md' }` path is relative to wrong directory | Use a path relative to the skill file's location, not the project root |
619
728
  | Parameters not visible to AI client | `parameters` defined as a plain object instead of an array | Use array format: `[{ name, description, type, required }]` |
620
729
 
730
+ ## Examples
731
+
732
+ | Example | Level | Description |
733
+ | ------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- |
734
+ | [`basic-tool-orchestration`](../examples/create-skill-with-tools/basic-tool-orchestration.md) | Basic | A skill that guides an AI client through a deploy workflow using referenced MCP tools. |
735
+ | [`directory-skill-with-tools`](../examples/create-skill-with-tools/directory-skill-with-tools.md) | Advanced | A directory-based skill loaded with `skillDir()`, plus a class-based skill using Agent Skills spec metadata fields. |
736
+ | [`incident-response-skill`](../examples/create-skill-with-tools/incident-response-skill.md) | Intermediate | A skill that uses object-style tool references with purpose descriptions and required flags, plus strict validation. |
737
+
738
+ > See all examples in [`examples/create-skill-with-tools/`](../examples/create-skill-with-tools/)
739
+
621
740
  ## Reference
622
741
 
623
742
  - [Skills Documentation](https://docs.agentfront.dev/frontmcp/servers/skills)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-skill
3
+ description: Create instruction-only skills that package knowledge and workflow guides for AI clients
4
+ ---
5
+
1
6
  # Creating Instruction-Only Skills
2
7
 
3
8
  Skills are knowledge and workflow packages that teach AI clients how to accomplish tasks. Unlike tools (which execute actions) or agents (which run autonomous LLM loops), a skill provides structured instructions that the AI follows on its own. An instruction-only skill contains no tool references -- it is purely a guide.
@@ -30,16 +35,23 @@ Create a class extending `SkillContext` and decorate it with `@Skill`. The decor
30
35
 
31
36
  ### SkillMetadata Fields
32
37
 
33
- | Field | Type | Required | Description |
34
- | ------------------- | ----------------------------------------------- | -------- | ----------------------------------------------------------- |
35
- | `name` | `string` | Yes | Unique skill name in kebab-case |
36
- | `description` | `string` | Yes | Short description of what the skill teaches |
37
- | `instructions` | `string \| { file: string } \| { url: string }` | Yes | The skill content -- see instruction sources below |
38
- | `parameters` | `SkillParameter[]` | No | Customization parameters for the skill |
39
- | `examples` | `SkillExample[]` | No | Usage scenarios and expected outcomes |
40
- | `tags` | `string[]` | No | Categorization tags for discovery |
41
- | `visibility` | `'mcp' \| 'http' \| 'both'` | No | Where the skill is discoverable (default: `'both'`) |
42
- | `hideFromDiscovery` | `boolean` | No | Register but hide from listing endpoints (default: `false`) |
38
+ | Field | Type | Required | Description |
39
+ | ------------------- | ----------------------------------------------- | -------- | -------------------------------------------------------------- |
40
+ | `name` | `string` | Yes | Unique skill name in kebab-case (max 64 chars) |
41
+ | `description` | `string` | Yes | Short description (max 1024 chars, no HTML/XML) |
42
+ | `instructions` | `string \| { file: string } \| { url: string }` | Yes | The skill content -- see instruction sources below |
43
+ | `parameters` | `SkillParameter[]` | No | Customization parameters for the skill |
44
+ | `examples` | `SkillExample[]` | No | Usage scenarios and expected outcomes |
45
+ | `tags` | `string[]` | No | Categorization tags for discovery |
46
+ | `visibility` | `'mcp' \| 'http' \| 'both'` | No | Where the skill is discoverable (default: `'both'`) |
47
+ | `hideFromDiscovery` | `boolean` | No | Register but hide from listing endpoints (default: `false`) |
48
+ | `priority` | `number` | No | Search ranking weight; higher = earlier (default: `0`) |
49
+ | `toolValidation` | `'strict' \| 'warn' \| 'ignore'` | No | Behavior when referenced tools are missing (default: `'warn'`) |
50
+ | `license` | `string` | No | License identifier per Agent Skills spec (e.g., `'MIT'`) |
51
+ | `compatibility` | `string` | No | Environment requirements (max 500 chars) |
52
+ | `specMetadata` | `Record<string, string>` | No | Arbitrary key-value map (Agent Skills spec `metadata` field) |
53
+ | `allowedTools` | `string` | No | Space-delimited pre-approved tool names (Agent Skills spec) |
54
+ | `resources` | `SkillResources` | No | Bundled dirs: `{ scripts?, references?, assets? }` |
43
55
 
44
56
  ### Basic Example
45
57
 
@@ -110,17 +122,27 @@ class GitCommitGuideSkill extends SkillContext {}
110
122
 
111
123
  ### File Reference
112
124
 
113
- Load instructions from a Markdown file. The path is relative to the skill file location.
125
+ Load instructions from a Markdown file. The path is resolved relative to the file that defines the skill (for both `@Skill` class decorators and `skill()` function calls).
114
126
 
115
127
  ```typescript
128
+ // Class-based: path resolves relative to this file's directory
116
129
  @Skill({
117
130
  name: 'architecture-guide',
118
131
  description: 'System architecture overview and patterns',
119
132
  instructions: { file: './docs/architecture.md' },
120
133
  })
121
134
  class ArchitectureGuideSkill extends SkillContext {}
135
+
136
+ // Function-based: same behavior — path resolves relative to this file's directory
137
+ export default skill({
138
+ name: 'architecture-guide',
139
+ description: 'System architecture overview and patterns',
140
+ instructions: { file: './docs/architecture.md' },
141
+ });
122
142
  ```
123
143
 
144
+ > **Directory structure example:** If this file is at `src/skills/arch.skill.ts`, the instruction file should be at `src/skills/docs/architecture.md`.
145
+
124
146
  ### URL Reference
125
147
 
126
148
  Load instructions from a remote URL. Fetched at build time when the skill is loaded.
@@ -210,6 +232,19 @@ const CodeReviewChecklist = skill({
210
232
 
211
233
  Register it the same way as a class skill: `skills: [CodeReviewChecklist]`.
212
234
 
235
+ The function builder also supports file-based instructions. Relative paths resolve from the file that calls `skill()`:
236
+
237
+ ```typescript
238
+ // src/skills/deploy-guide.skill.ts
239
+ import { skill } from '@frontmcp/sdk';
240
+
241
+ export default skill({
242
+ name: 'deploy-guide',
243
+ description: 'Step-by-step deployment checklist',
244
+ instructions: { file: './docs/deploy-guide.md' }, // resolves to src/skills/docs/deploy-guide.md
245
+ });
246
+ ```
247
+
213
248
  ## Directory-Based Skills with skillDir()
214
249
 
215
250
  Use `skillDir()` to load a skill from a directory containing a `SKILL.md` file with YAML frontmatter, plus optional subdirectories for scripts, references, and assets.
@@ -447,7 +482,7 @@ import { Skill, SkillContext, FrontMcp, App, skill, skillDir } from '@frontmcp/s
447
482
 
448
483
  ## Step 1: Environment Setup
449
484
  1. Clone the repository
450
- 2. Install Node.js 22+ and Yarn
485
+ 2. Install Node.js 24+ and Yarn
451
486
  3. Run \`yarn install\` to install dependencies
452
487
  4. Copy \`.env.example\` to \`.env\` and fill in values
453
488
 
@@ -571,6 +606,16 @@ class DevServer {}
571
606
  | Skill parameters are ignored by the AI | Parameters are declared but not referenced in the instruction text | Mention each parameter by name in the instructions so the AI knows how to apply them |
572
607
  | Directory-based skill missing bundled files | Subdirectories are not named `scripts/`, `references/`, or `assets/` | Use the exact conventional directory names; other names are not auto-bundled |
573
608
 
609
+ ## Examples
610
+
611
+ | Example | Level | Description |
612
+ | ---------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
613
+ | [`basic-inline-skill`](../examples/create-skill/basic-inline-skill.md) | Basic | A minimal instruction-only skill with inline content and the function builder alternative. |
614
+ | [`directory-based-skill`](../examples/create-skill/directory-based-skill.md) | Advanced | A skill loaded from a directory structure with SKILL.md frontmatter, plus file-based and URL-based instruction sources. |
615
+ | [`parameterized-skill`](../examples/create-skill/parameterized-skill.md) | Intermediate | A skill with customizable parameters, usage examples for AI guidance, and controlled visibility. |
616
+
617
+ > See all examples in [`examples/create-skill/`](../examples/create-skill/)
618
+
574
619
  ## Reference
575
620
 
576
621
  - **Docs:** <https://docs.agentfront.dev/frontmcp/servers/skills>
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-tool-annotations
3
+ description: Reference for MCP tool annotation hints like readOnly, destructive, and idempotent
4
+ ---
5
+
1
6
  # Tool Annotations Reference
2
7
 
3
8
  Annotations provide hints to MCP clients about tool behavior:
@@ -32,3 +37,12 @@ Annotations provide hints to MCP clients about tool behavior:
32
37
  - Set `destructiveHint: true` for delete/overwrite operations (triggers client warnings)
33
38
  - Set `idempotentHint: true` for safe-to-retry tools
34
39
  - Set `openWorldHint: false` for tools that only access local data
40
+
41
+ ## Examples
42
+
43
+ | Example | Level | Description |
44
+ | ------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
45
+ | [`destructive-delete-tool`](../examples/create-tool-annotations/destructive-delete-tool.md) | Intermediate | Demonstrates annotating a tool that deletes data, enabling MCP clients to warn users before execution. |
46
+ | [`readonly-query-tool`](../examples/create-tool-annotations/readonly-query-tool.md) | Basic | Demonstrates annotating a tool that only reads data, signaling to MCP clients that it has no side effects and is safe to retry. |
47
+
48
+ > See all examples in [`examples/create-tool-annotations/`](../examples/create-tool-annotations/)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-tool-output-schema-types
3
+ description: Reference for all supported outputSchema types including Zod shapes and JSON Schema
4
+ ---
5
+
1
6
  # Output Schema Types Reference
2
7
 
3
8
  All supported `outputSchema` types for `@Tool`:
@@ -54,3 +59,13 @@ When `outputSchema` is omitted, the tool returns unvalidated content. This:
54
59
  - Risks leaking internal fields to the client
55
60
  - Prevents CodeCall from inferring return types
56
61
  - Loses compile-time type checking on `Out` generic
62
+
63
+ ## Examples
64
+
65
+ | Example | Level | Description |
66
+ | ----------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67
+ | [`primitive-and-media-outputs`](../examples/create-tool-output-schema-types/primitive-and-media-outputs.md) | Intermediate | Demonstrates using primitive string literals and media types as `outputSchema` for tools that return plain text, images, or multi-content arrays. |
68
+ | [`zod-raw-shape-output`](../examples/create-tool-output-schema-types/zod-raw-shape-output.md) | Basic | Demonstrates the recommended approach of using a Zod raw shape as `outputSchema` for structured, validated JSON output. |
69
+ | [`zod-schema-advanced-output`](../examples/create-tool-output-schema-types/zod-schema-advanced-output.md) | Advanced | Demonstrates using full Zod schema objects (not raw shapes) as `outputSchema`, including `z.object()`, `z.array()`, `z.union()`, and `z.discriminatedUnion()`. |
70
+
71
+ > See all examples in [`examples/create-tool-output-schema-types/`](../examples/create-tool-output-schema-types/)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-tool
3
+ description: Build MCP tools with Zod input/output validation and dependency injection
4
+ ---
5
+
1
6
  # Creating an MCP Tool
2
7
 
3
8
  Tools are the primary way to expose executable actions to AI clients in the MCP protocol. In FrontMCP, tools are TypeScript classes that extend `ToolContext`, decorated with `@Tool`, and registered on a `@FrontMcp` server or inside an `@App`.
@@ -67,7 +72,19 @@ class GreetUserTool extends ToolContext {
67
72
  - `this.output` -- the output (available after execute)
68
73
  - `this.metadata` -- tool metadata from the decorator
69
74
  - `this.scope` -- the current scope instance
70
- - `this.context` -- the execution context
75
+ - `this.context` -- the execution context (see below)
76
+
77
+ **`this.context` properties (FrontMcpContext):**
78
+
79
+ | Property | Type | Description |
80
+ | -------------- | ------------------- | ----------------------------------- |
81
+ | `requestId` | `string` | Unique ID for this request |
82
+ | `sessionId` | `string` | Session identifier |
83
+ | `scopeId` | `string` | Scope identifier |
84
+ | `authInfo` | `Partial<AuthInfo>` | Authentication info for the request |
85
+ | `traceContext` | `TraceContext` | Distributed tracing context |
86
+ | `timestamp` | `number` | Request timestamp |
87
+ | `metadata` | `RequestMetadata` | Request headers, client IP, etc. |
71
88
 
72
89
  ## Input Schema: Zod Raw Shapes
73
90
 
@@ -192,6 +209,26 @@ async execute(input: { data: string }) {
192
209
 
193
210
  ## Error Handling
194
211
 
212
+ **Do NOT wrap `execute()` in try/catch.** The framework's tool execution flow automatically catches exceptions, formats error responses, and triggers error hooks. Only use `this.fail(err)` for **business-logic errors** (validation failures, not-found, permission denied). Let infrastructure errors (network, database) propagate naturally.
213
+
214
+ ```typescript
215
+ // WRONG — never do this:
216
+ async execute(input) {
217
+ try {
218
+ const result = await someOperation();
219
+ return result;
220
+ } catch (err) {
221
+ this.fail(err instanceof Error ? err : new Error(String(err)));
222
+ }
223
+ }
224
+
225
+ // CORRECT — let the framework handle errors:
226
+ async execute(input) {
227
+ const result = await someOperation(); // errors propagate to framework
228
+ return result;
229
+ }
230
+ ```
231
+
195
232
  Use `this.fail(err)` to abort execution and trigger the error flow. The method throws internally and never returns.
196
233
 
197
234
  ```typescript
@@ -411,6 +448,163 @@ class ExpensiveOperationTool extends ToolContext {
411
448
  }
412
449
  ```
413
450
 
451
+ ## Auth Providers
452
+
453
+ Declare which auth providers a tool requires. Credentials are loaded before tool execution.
454
+
455
+ ```typescript
456
+ // String shorthand — single provider
457
+ @Tool({
458
+ name: 'create_issue',
459
+ description: 'Create a GitHub issue',
460
+ inputSchema: { title: z.string(), body: z.string() },
461
+ authProviders: ['github'],
462
+ })
463
+ class CreateIssueTool extends ToolContext {
464
+ /* ... */
465
+ }
466
+
467
+ // Full mapping — with scopes and required flag
468
+ @Tool({
469
+ name: 'deploy_app',
470
+ description: 'Deploy to cloud',
471
+ inputSchema: { env: z.string() },
472
+ authProviders: [
473
+ { name: 'github', required: true, scopes: ['repo', 'workflow'] },
474
+ { name: 'aws', required: false, alias: 'cloud' },
475
+ ],
476
+ })
477
+ class DeployAppTool extends ToolContext {
478
+ /* ... */
479
+ }
480
+ ```
481
+
482
+ Auth provider mapping fields:
483
+
484
+ - `name` — Provider name (must match a registered `@AuthProvider`)
485
+ - `required?` — Whether credential is required (default: `true`)
486
+ - `scopes?` — Required OAuth scopes
487
+ - `alias?` — Alias for injection when using multiple providers
488
+
489
+ ## Environment Availability
490
+
491
+ Restrict a tool to specific platforms, runtimes, or environments using `availableWhen`. The tool will be automatically filtered from discovery and blocked from execution when the constraint doesn't match.
492
+
493
+ > **Important:** `availableWhen` is a **registry-level** constraint, evaluated at server boot time against the process's runtime context (OS, runtime, deployment mode, NODE_ENV). This is fundamentally different from:
494
+ >
495
+ > - **Authorization** — per-request, evaluated in HTTP flows against session/user identity
496
+ > - **Rule-based filtering** — dynamic, policy-driven, evaluated at request time
497
+ > - **`hideFromDiscovery`** — a soft hide from listing; hidden tools can still be called directly
498
+ >
499
+ > `availableWhen` is a **hard constraint**: filtered tools are excluded from both listing AND execution. Results are logged at boot time for operational visibility.
500
+
501
+ ```typescript
502
+ // macOS-only tool
503
+ @Tool({
504
+ name: 'apple_notes_search',
505
+ description: 'Search Apple Notes',
506
+ inputSchema: { query: z.string() },
507
+ availableWhen: { platform: ['darwin'] },
508
+ })
509
+ class AppleNotesSearchTool extends ToolContext {
510
+ async execute(input: { query: string }) {
511
+ // Only runs on macOS
512
+ }
513
+ }
514
+
515
+ // Node.js production-only tool
516
+ @Tool({
517
+ name: 'deploy_service',
518
+ description: 'Deploy to production',
519
+ inputSchema: { service: z.string() },
520
+ availableWhen: { runtime: ['node'], env: ['production'] },
521
+ })
522
+ class DeployServiceTool extends ToolContext {
523
+ async execute(input: { service: string }) {
524
+ // Only available in Node.js production
525
+ }
526
+ }
527
+ ```
528
+
529
+ Available constraint fields (AND across fields, OR within arrays):
530
+
531
+ - `platform` — OS: `'darwin'`, `'linux'`, `'win32'`
532
+ - `runtime` — JS runtime: `'node'`, `'browser'`, `'edge'`, `'bun'`, `'deno'`
533
+ - `deployment` — Mode: `'serverless'`, `'standalone'`
534
+ - `env` — NODE_ENV: `'production'`, `'development'`, `'test'`
535
+
536
+ You can also check the platform imperatively inside `execute()`:
537
+
538
+ ```typescript
539
+ if (this.isPlatform('darwin')) {
540
+ /* macOS logic */
541
+ }
542
+ if (this.isRuntime('node')) {
543
+ /* Node.js logic */
544
+ }
545
+ if (this.isEnv('production')) {
546
+ /* production logic */
547
+ }
548
+ ```
549
+
550
+ ## Elicitation (Interactive Input)
551
+
552
+ Tools can request interactive input from users mid-execution using `this.elicit()`. Requires `elicitation` to be enabled at server level.
553
+
554
+ ```typescript
555
+ @Tool({
556
+ name: 'confirm_delete',
557
+ description: 'Delete a resource after user confirmation',
558
+ inputSchema: { resourceId: z.string() },
559
+ })
560
+ class ConfirmDeleteTool extends ToolContext {
561
+ async execute(input: { resourceId: string }) {
562
+ const result = await this.elicit('Are you sure you want to delete this resource?', {
563
+ confirm: z.boolean().describe('Confirm deletion'),
564
+ reason: z.string().optional().describe('Reason for deletion'),
565
+ });
566
+
567
+ if (result.action === 'accept' && result.data.confirm) {
568
+ await this.get(ResourceService).delete(input.resourceId);
569
+ return 'Resource deleted';
570
+ }
571
+ return 'Deletion cancelled';
572
+ }
573
+ }
574
+ ```
575
+
576
+ > **Note:** Elicitation must be enabled at server level: `@FrontMcp({ elicitation: { enabled: true } })`. See `configure-elicitation` for full configuration options.
577
+
578
+ ## Tool Examples
579
+
580
+ Provide usage examples for documentation and discovery:
581
+
582
+ ```typescript
583
+ @Tool({
584
+ name: 'convert_currency',
585
+ description: 'Convert between currencies',
586
+ inputSchema: {
587
+ amount: z.number(),
588
+ from: z.string(),
589
+ to: z.string(),
590
+ },
591
+ examples: [
592
+ {
593
+ description: 'Convert USD to EUR',
594
+ input: { amount: 100, from: 'USD', to: 'EUR' },
595
+ output: { converted: 85.5, rate: 0.855 },
596
+ },
597
+ {
598
+ description: 'Convert with large amount',
599
+ input: { amount: 1_000_000, from: 'GBP', to: 'JPY' },
600
+ },
601
+ ],
602
+ })
603
+ class ConvertCurrencyTool extends ToolContext {
604
+ /* ... */
605
+ }
606
+ ```
607
+
414
608
  ## Common Patterns
415
609
 
416
610
  | Pattern | Correct | Incorrect | Why |
@@ -448,6 +642,16 @@ class ExpensiveOperationTool extends ToolContext {
448
642
  | Output contains unexpected fields | No `outputSchema` defined | Add `outputSchema` to strip unvalidated fields from response |
449
643
  | Tool times out | No timeout configured for long operation | Add `timeout: { executeMs: 30_000 }` to `@Tool` options |
450
644
 
645
+ ## Examples
646
+
647
+ | Example | Level | Description |
648
+ | --------------------------------------------------------------------------------------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------- |
649
+ | [`basic-class-tool`](../examples/create-tool/basic-class-tool.md) | Basic | A minimal tool using the class-based pattern with Zod input validation and output schema. |
650
+ | [`tool-with-di-and-errors`](../examples/create-tool/tool-with-di-and-errors.md) | Intermediate | A tool that resolves a database service via DI and uses `this.fail()` for business-logic errors. |
651
+ | [`tool-with-rate-limiting-and-progress`](../examples/create-tool/tool-with-rate-limiting-and-progress.md) | Advanced | A batch processing tool that uses rate limiting, concurrency control, progress notifications, and annotations. |
652
+
653
+ > See all examples in [`examples/create-tool/`](../examples/create-tool/)
654
+
451
655
  ## Reference
452
656
 
453
657
  - [Tools Documentation](https://docs.agentfront.dev/frontmcp/servers/tools)
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: create-workflow
3
+ description: Connect multiple jobs into managed DAG pipelines with dependencies, conditions, and triggers
4
+ ---
5
+
1
6
  # Creating Workflows
2
7
 
3
8
  Workflows connect multiple jobs into managed execution pipelines with step dependencies, conditions, and triggers. A workflow defines a directed acyclic graph (DAG) of steps where each step runs a named job, and the framework handles ordering, parallelism, error propagation, and trigger management.
@@ -745,6 +750,16 @@ class CiServer {}
745
750
  | Webhook trigger does not fire | Missing or mismatched `webhook.secret` | Ensure `webhook.secret` matches the sender's HMAC secret and `webhook.path` is correct |
746
751
  | Workflow exceeds timeout | Total step execution time exceeds the default 600000 ms | Increase `timeout` at the workflow level or add per-step `timeout` overrides |
747
752
 
753
+ ## Examples
754
+
755
+ | Example | Level | Description |
756
+ | --------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------- |
757
+ | [`basic-deploy-pipeline`](../examples/create-workflow/basic-deploy-pipeline.md) | Basic | A linear workflow that builds, tests, and deploys a service with step dependencies and dynamic input. |
758
+ | [`parallel-validation-pipeline`](../examples/create-workflow/parallel-validation-pipeline.md) | Intermediate | A workflow that validates multiple datasets in parallel, then conditionally merges results or notifies on failure. |
759
+ | [`webhook-triggered-workflow`](../examples/create-workflow/webhook-triggered-workflow.md) | Advanced | A CI/CD workflow triggered by a webhook, featuring `continueOnError`, per-step conditions, and the `workflow()` function builder. |
760
+
761
+ > See all examples in [`examples/create-workflow/`](../examples/create-workflow/)
762
+
748
763
  ## Reference
749
764
 
750
765
  - [Workflows Documentation](https://docs.agentfront.dev/frontmcp/servers/workflows)