@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.
- package/README.md +2 -2
- package/catalog/TEMPLATE.md +69 -0
- package/catalog/frontmcp-config/SKILL.md +38 -22
- package/catalog/frontmcp-config/examples/configure-auth/multi-app-auth.md +87 -0
- package/catalog/frontmcp-config/examples/configure-auth/public-mode-setup.md +63 -0
- package/catalog/frontmcp-config/examples/configure-auth/remote-oauth-with-vault.md +76 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/local-self-signed-tokens.md +77 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/remote-enterprise-oauth.md +73 -0
- package/catalog/frontmcp-config/examples/configure-auth-modes/transparent-jwt-validation.md +64 -0
- package/catalog/frontmcp-config/examples/configure-elicitation/basic-confirmation-gate.md +83 -0
- package/catalog/frontmcp-config/examples/configure-elicitation/distributed-elicitation-redis.md +87 -0
- package/catalog/frontmcp-config/examples/configure-http/cors-restricted-origins.md +52 -0
- package/catalog/frontmcp-config/examples/configure-http/entry-path-reverse-proxy.md +72 -0
- package/catalog/frontmcp-config/examples/configure-http/unix-socket-local.md +64 -0
- package/catalog/frontmcp-config/examples/configure-session/multi-server-key-prefix.md +68 -0
- package/catalog/frontmcp-config/examples/configure-session/redis-session-store.md +52 -0
- package/catalog/frontmcp-config/examples/configure-session/vercel-kv-session.md +52 -0
- package/catalog/frontmcp-config/examples/configure-throttle/distributed-redis-throttle.md +94 -0
- package/catalog/frontmcp-config/examples/configure-throttle/per-tool-rate-limit.md +92 -0
- package/catalog/frontmcp-config/examples/configure-throttle/server-level-rate-limit.md +83 -0
- package/catalog/frontmcp-config/examples/configure-throttle-guard-config/full-guard-config.md +99 -0
- package/catalog/frontmcp-config/examples/configure-throttle-guard-config/minimal-guard-config.md +55 -0
- package/catalog/frontmcp-config/examples/configure-transport/custom-protocol-flags.md +74 -0
- package/catalog/frontmcp-config/examples/configure-transport/distributed-sessions-redis.md +86 -0
- package/catalog/frontmcp-config/examples/configure-transport/stateless-serverless.md +69 -0
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/legacy-preset-nodejs.md +65 -0
- package/catalog/frontmcp-config/examples/configure-transport-protocol-presets/stateless-api-serverless.md +69 -0
- package/catalog/frontmcp-config/references/configure-auth-modes.md +15 -0
- package/catalog/frontmcp-config/references/configure-auth.md +15 -0
- package/catalog/frontmcp-config/references/configure-elicitation.md +14 -0
- package/catalog/frontmcp-config/references/configure-http.md +15 -0
- package/catalog/frontmcp-config/references/configure-session.md +15 -0
- package/catalog/frontmcp-config/references/configure-throttle-guard-config.md +14 -0
- package/catalog/frontmcp-config/references/configure-throttle.md +15 -0
- package/catalog/frontmcp-config/references/configure-transport-protocol-presets.md +14 -0
- package/catalog/frontmcp-config/references/configure-transport.md +15 -0
- package/catalog/frontmcp-config/references/setup-redis.md +10 -0
- package/catalog/frontmcp-config/references/setup-sqlite.md +10 -0
- package/catalog/frontmcp-deployment/SKILL.md +40 -12
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-build-with-custom-entry.md +43 -0
- package/catalog/frontmcp-deployment/examples/build-for-browser/browser-crypto-and-storage.md +85 -0
- package/catalog/frontmcp-deployment/examples/build-for-browser/react-provider-setup.md +61 -0
- package/catalog/frontmcp-deployment/examples/build-for-cli/cli-binary-build.md +66 -0
- package/catalog/frontmcp-deployment/examples/build-for-cli/unix-socket-daemon.md +76 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/connect-openai.md +78 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/create-flat-config.md +85 -0
- package/catalog/frontmcp-deployment/examples/build-for-sdk/multi-platform-connect.md +104 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/basic-worker-deploy.md +82 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-custom-domain.md +97 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-cloudflare/worker-with-kv-storage.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/cdk-deployment.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/lambda-handler-with-cors.md +113 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-lambda/sam-template-basic.md +100 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/docker-compose-with-redis.md +101 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/pm2-with-nginx.md +79 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node/resource-limits.md +92 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/basic-multistage-dockerfile.md +63 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-node-dockerfile/secure-nonroot-dockerfile.md +89 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-mcp-endpoint-test.md +69 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-kv.md +82 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel/vercel-with-skills-cache.md +90 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/minimal-vercel-config.md +49 -0
- package/catalog/frontmcp-deployment/examples/deploy-to-vercel-config/vercel-config-with-security-headers.md +92 -0
- package/catalog/frontmcp-deployment/references/build-for-browser.md +15 -0
- package/catalog/frontmcp-deployment/references/build-for-cli.md +65 -3
- package/catalog/frontmcp-deployment/references/build-for-sdk.md +15 -0
- package/catalog/frontmcp-deployment/references/deploy-to-cloudflare.md +15 -0
- package/catalog/frontmcp-deployment/references/deploy-to-lambda.md +18 -3
- package/catalog/frontmcp-deployment/references/deploy-to-node-dockerfile.md +16 -2
- package/catalog/frontmcp-deployment/references/deploy-to-node.md +19 -4
- package/catalog/frontmcp-deployment/references/deploy-to-vercel-config.md +14 -0
- package/catalog/frontmcp-deployment/references/deploy-to-vercel.md +15 -0
- package/catalog/frontmcp-development/SKILL.md +25 -17
- package/catalog/frontmcp-development/examples/create-adapter/basic-api-adapter.md +92 -0
- package/catalog/frontmcp-development/examples/create-adapter/namespaced-adapter.md +124 -0
- package/catalog/frontmcp-development/examples/create-agent/basic-agent-with-tools.md +121 -0
- package/catalog/frontmcp-development/examples/create-agent/custom-multi-pass-agent.md +95 -0
- package/catalog/frontmcp-development/examples/create-agent/nested-agents-with-swarm.md +111 -0
- package/catalog/frontmcp-development/examples/create-agent-llm-config/anthropic-config.md +81 -0
- package/catalog/frontmcp-development/examples/create-agent-llm-config/openai-config.md +80 -0
- package/catalog/frontmcp-development/examples/create-job/basic-report-job.md +87 -0
- package/catalog/frontmcp-development/examples/create-job/job-with-permissions.md +117 -0
- package/catalog/frontmcp-development/examples/create-job/job-with-retry.md +88 -0
- package/catalog/frontmcp-development/examples/create-plugin/basic-plugin-with-provider.md +69 -0
- package/catalog/frontmcp-development/examples/create-plugin/configurable-dynamic-plugin.md +178 -0
- package/catalog/frontmcp-development/examples/create-plugin/plugin-with-context-extension.md +107 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/basic-logging-plugin.md +69 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/caching-with-around.md +80 -0
- package/catalog/frontmcp-development/examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md +100 -0
- package/catalog/frontmcp-development/examples/create-prompt/basic-prompt.md +72 -0
- package/catalog/frontmcp-development/examples/create-prompt/dynamic-rag-prompt.md +92 -0
- package/catalog/frontmcp-development/examples/create-prompt/multi-turn-debug-session.md +86 -0
- package/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md +113 -0
- package/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md +107 -0
- package/catalog/frontmcp-development/examples/create-resource/basic-static-resource.md +72 -0
- package/catalog/frontmcp-development/examples/create-resource/binary-and-multi-content.md +111 -0
- package/catalog/frontmcp-development/examples/create-resource/parameterized-template.md +84 -0
- package/catalog/frontmcp-development/examples/create-skill/basic-inline-skill.md +96 -0
- package/catalog/frontmcp-development/examples/create-skill/directory-based-skill.md +115 -0
- package/catalog/frontmcp-development/examples/create-skill/parameterized-skill.md +96 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/basic-tool-orchestration.md +76 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/directory-skill-with-tools.md +149 -0
- package/catalog/frontmcp-development/examples/create-skill-with-tools/incident-response-skill.md +92 -0
- package/catalog/frontmcp-development/examples/create-tool/basic-class-tool.md +62 -0
- package/catalog/frontmcp-development/examples/create-tool/tool-with-di-and-errors.md +84 -0
- package/catalog/frontmcp-development/examples/create-tool/tool-with-rate-limiting-and-progress.md +93 -0
- package/catalog/frontmcp-development/examples/create-tool-annotations/destructive-delete-tool.md +94 -0
- package/catalog/frontmcp-development/examples/create-tool-annotations/readonly-query-tool.md +60 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/primitive-and-media-outputs.md +104 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-raw-shape-output.md +63 -0
- package/catalog/frontmcp-development/examples/create-tool-output-schema-types/zod-schema-advanced-output.md +103 -0
- package/catalog/frontmcp-development/examples/create-workflow/basic-deploy-pipeline.md +91 -0
- package/catalog/frontmcp-development/examples/create-workflow/parallel-validation-pipeline.md +90 -0
- package/catalog/frontmcp-development/examples/create-workflow/webhook-triggered-workflow.md +136 -0
- package/catalog/frontmcp-development/examples/decorators-guide/agent-skill-job-workflow.md +145 -0
- package/catalog/frontmcp-development/examples/decorators-guide/basic-server-with-app-and-tools.md +124 -0
- package/catalog/frontmcp-development/examples/decorators-guide/multi-app-with-plugins-and-providers.md +149 -0
- package/catalog/frontmcp-development/examples/official-adapters/authenticated-adapter-with-polling.md +84 -0
- package/catalog/frontmcp-development/examples/official-adapters/basic-openapi-adapter.md +54 -0
- package/catalog/frontmcp-development/examples/official-adapters/multi-api-hub-with-inline-spec.md +130 -0
- package/catalog/frontmcp-development/examples/official-plugins/cache-and-feature-flags.md +117 -0
- package/catalog/frontmcp-development/examples/official-plugins/production-multi-plugin-setup.md +147 -0
- package/catalog/frontmcp-development/examples/official-plugins/remember-plugin-session-memory.md +104 -0
- package/catalog/frontmcp-development/references/create-adapter.md +14 -0
- package/catalog/frontmcp-development/references/create-agent-llm-config.md +14 -0
- package/catalog/frontmcp-development/references/create-agent.md +15 -0
- package/catalog/frontmcp-development/references/create-job.md +15 -0
- package/catalog/frontmcp-development/references/create-plugin-hooks.md +51 -0
- package/catalog/frontmcp-development/references/create-plugin.md +186 -11
- package/catalog/frontmcp-development/references/create-prompt.md +17 -0
- package/catalog/frontmcp-development/references/create-provider.md +14 -0
- package/catalog/frontmcp-development/references/create-resource.md +127 -0
- package/catalog/frontmcp-development/references/create-skill-with-tools.md +126 -7
- package/catalog/frontmcp-development/references/create-skill.md +57 -12
- package/catalog/frontmcp-development/references/create-tool-annotations.md +14 -0
- package/catalog/frontmcp-development/references/create-tool-output-schema-types.md +15 -0
- package/catalog/frontmcp-development/references/create-tool.md +205 -1
- package/catalog/frontmcp-development/references/create-workflow.md +15 -0
- package/catalog/frontmcp-development/references/decorators-guide.md +155 -78
- package/catalog/frontmcp-development/references/official-adapters.md +31 -16
- package/catalog/frontmcp-development/references/official-plugins.md +62 -28
- package/catalog/frontmcp-extensibility/SKILL.md +103 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/product-catalog-search.md +175 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/semantic-search-with-persistence.md +138 -0
- package/catalog/frontmcp-extensibility/examples/vectoriadb/tfidf-keyword-search.md +103 -0
- package/catalog/frontmcp-extensibility/references/vectoriadb.md +299 -0
- package/catalog/frontmcp-guides/SKILL.md +7 -4
- package/catalog/frontmcp-guides/examples/example-knowledge-base/agent-and-plugin.md +160 -0
- package/catalog/frontmcp-guides/examples/example-knowledge-base/multi-app-composition.md +92 -0
- package/catalog/frontmcp-guides/examples/example-knowledge-base/vector-search-and-resources.md +135 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/auth-and-crud-tools.md +135 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/authenticated-e2e-tests.md +148 -0
- package/catalog/frontmcp-guides/examples/example-task-manager/redis-provider-with-di.md +129 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/server-and-app-setup.md +75 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/unit-and-e2e-tests.md +142 -0
- package/catalog/frontmcp-guides/examples/example-weather-api/weather-tool-with-schemas.md +74 -0
- package/catalog/frontmcp-guides/references/example-knowledge-base.md +15 -0
- package/catalog/frontmcp-guides/references/example-task-manager.md +30 -21
- package/catalog/frontmcp-guides/references/example-weather-api.md +18 -6
- package/catalog/frontmcp-observability/SKILL.md +144 -0
- package/catalog/frontmcp-observability/examples/structured-logging/stdout-logging.md +71 -0
- package/catalog/frontmcp-observability/examples/structured-logging/winston-integration.md +70 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/agent-nested-tracing.md +86 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/plugin-telemetry.md +93 -0
- package/catalog/frontmcp-observability/examples/telemetry-api/tool-custom-spans.md +72 -0
- package/catalog/frontmcp-observability/examples/testing-observability/test-custom-spans.md +90 -0
- package/catalog/frontmcp-observability/examples/testing-observability/test-log-correlation.md +104 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/basic-tracing.md +82 -0
- package/catalog/frontmcp-observability/examples/tracing-setup/production-tracing.md +73 -0
- package/catalog/frontmcp-observability/examples/vendor-integrations/coralogix-setup.md +74 -0
- package/catalog/frontmcp-observability/references/structured-logging.md +114 -0
- package/catalog/frontmcp-observability/references/telemetry-api.md +155 -0
- package/catalog/frontmcp-observability/references/testing-observability.md +169 -0
- package/catalog/frontmcp-observability/references/tracing-setup.md +146 -0
- package/catalog/frontmcp-observability/references/vendor-integrations.md +164 -0
- package/catalog/frontmcp-production-readiness/SKILL.md +99 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/caching-and-performance.md +102 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/observability-setup.md +104 -0
- package/catalog/frontmcp-production-readiness/examples/common-checklist/security-hardening.md +95 -0
- package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/basic-health-setup.md +81 -0
- package/catalog/frontmcp-production-readiness/examples/health-readiness-endpoints/custom-probes.md +136 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/browser-bundle-config.md +93 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/cross-platform-crypto.md +116 -0
- package/catalog/frontmcp-production-readiness/examples/production-browser/security-and-performance.md +128 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-binary/binary-build-config.md +109 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-binary/stdio-transport-error-handling.md +132 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/daemon-socket-config.md +82 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/graceful-shutdown-cleanup.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-cli-daemon/security-and-permissions.md +119 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/durable-objects-state.md +124 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/workers-runtime-constraints.md +103 -0
- package/catalog/frontmcp-production-readiness/examples/production-cloudflare/wrangler-config.md +89 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/cold-start-connection-reuse.md +122 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/sam-template.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-lambda/scaling-and-monitoring.md +138 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/basic-sdk-lifecycle.md +85 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/multi-instance-cleanup.md +110 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-sdk/package-json-config.md +107 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/docker-multi-stage.md +103 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/graceful-shutdown.md +87 -0
- package/catalog/frontmcp-production-readiness/examples/production-node-server/redis-session-scaling.md +97 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/cold-start-optimization.md +104 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/stateless-serverless-design.md +91 -0
- package/catalog/frontmcp-production-readiness/examples/production-vercel/vercel-edge-config.md +78 -0
- package/catalog/frontmcp-production-readiness/references/common-checklist.md +175 -0
- package/catalog/frontmcp-production-readiness/references/health-readiness-endpoints.md +198 -0
- package/catalog/frontmcp-production-readiness/references/production-browser.md +56 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-binary.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-cli-daemon.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-cloudflare.md +62 -0
- package/catalog/frontmcp-production-readiness/references/production-lambda.md +63 -0
- package/catalog/frontmcp-production-readiness/references/production-node-sdk.md +76 -0
- package/catalog/frontmcp-production-readiness/references/production-node-server.md +71 -0
- package/catalog/frontmcp-production-readiness/references/production-vercel.md +62 -0
- package/catalog/frontmcp-setup/SKILL.md +19 -14
- package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/bundle-presets-scaffolding.md +61 -0
- package/catalog/frontmcp-setup/examples/frontmcp-skills-usage/install-and-search-skills.md +83 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/local-apps-with-shared-tools.md +87 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/per-app-auth-and-isolation.md +88 -0
- package/catalog/frontmcp-setup/examples/multi-app-composition/remote-and-esm-apps.md +81 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/build-test-affected.md +77 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/multi-server-deployment.md +93 -0
- package/catalog/frontmcp-setup/examples/nx-workflow/scaffold-and-generate.md +62 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-generator-scaffolding.md +73 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/nx-workspace-with-apps.md +85 -0
- package/catalog/frontmcp-setup/examples/project-structure-nx/shared-library-usage.md +89 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/dev-workflow-commands.md +64 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/feature-folder-organization.md +111 -0
- package/catalog/frontmcp-setup/examples/project-structure-standalone/minimal-standalone-layout.md +73 -0
- package/catalog/frontmcp-setup/examples/readme-guide/node-server-readme.md +89 -0
- package/catalog/frontmcp-setup/examples/readme-guide/vercel-deployment-readme.md +90 -0
- package/catalog/frontmcp-setup/examples/setup-project/basic-node-server.md +99 -0
- package/catalog/frontmcp-setup/examples/setup-project/cli-scaffold-with-flags.md +77 -0
- package/catalog/frontmcp-setup/examples/setup-project/vercel-serverless-server.md +89 -0
- package/catalog/frontmcp-setup/examples/setup-redis/docker-redis-local-dev.md +88 -0
- package/catalog/frontmcp-setup/examples/setup-redis/hybrid-vercel-kv-with-pubsub.md +78 -0
- package/catalog/frontmcp-setup/examples/setup-redis/vercel-kv-serverless.md +78 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/basic-sqlite-setup.md +75 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/encrypted-sqlite-storage.md +55 -0
- package/catalog/frontmcp-setup/examples/setup-sqlite/unix-socket-daemon.md +70 -0
- package/catalog/frontmcp-setup/references/frontmcp-skills-usage.md +33 -9
- package/catalog/frontmcp-setup/references/multi-app-composition.md +15 -0
- package/catalog/frontmcp-setup/references/nx-workflow.md +15 -0
- package/catalog/frontmcp-setup/references/project-structure-nx.md +15 -0
- package/catalog/frontmcp-setup/references/project-structure-standalone.md +15 -0
- package/catalog/frontmcp-setup/references/readme-guide.md +235 -0
- package/catalog/frontmcp-setup/references/setup-project.md +16 -1
- package/catalog/frontmcp-setup/references/setup-redis.md +15 -0
- package/catalog/frontmcp-setup/references/setup-sqlite.md +15 -0
- package/catalog/frontmcp-testing/SKILL.md +41 -27
- package/catalog/frontmcp-testing/examples/setup-testing/fixture-based-e2e-test.md +70 -0
- package/catalog/frontmcp-testing/examples/setup-testing/jest-config-with-coverage.md +59 -0
- package/catalog/frontmcp-testing/examples/setup-testing/unit-test-tool-resource-prompt.md +115 -0
- package/catalog/frontmcp-testing/examples/test-auth/oauth-flow-test.md +78 -0
- package/catalog/frontmcp-testing/examples/test-auth/role-based-access-test.md +88 -0
- package/catalog/frontmcp-testing/examples/test-auth/token-factory-test.md +71 -0
- package/catalog/frontmcp-testing/examples/test-browser-build/browser-bundle-validation.md +58 -0
- package/catalog/frontmcp-testing/examples/test-browser-build/playwright-browser-test.md +69 -0
- package/catalog/frontmcp-testing/examples/test-cli-binary/binary-startup-test.md +77 -0
- package/catalog/frontmcp-testing/examples/test-cli-binary/js-bundle-import-test.md +56 -0
- package/catalog/frontmcp-testing/examples/test-direct-client/basic-create-test.md +74 -0
- package/catalog/frontmcp-testing/examples/test-direct-client/openai-claude-format-test.md +79 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/basic-e2e-test.md +67 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/manual-client-with-transport.md +72 -0
- package/catalog/frontmcp-testing/examples/test-e2e-handler/tool-call-and-error-e2e.md +73 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/basic-tool-test.md +69 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/schema-validation-test.md +82 -0
- package/catalog/frontmcp-testing/examples/test-tool-unit/tool-error-handling-test.md +92 -0
- package/catalog/frontmcp-testing/references/setup-testing.md +17 -0
- package/catalog/frontmcp-testing/references/test-auth.md +15 -0
- package/catalog/frontmcp-testing/references/test-browser-build.md +14 -0
- package/catalog/frontmcp-testing/references/test-cli-binary.md +14 -0
- package/catalog/frontmcp-testing/references/test-direct-client.md +14 -0
- package/catalog/frontmcp-testing/references/test-e2e-handler.md +15 -0
- package/catalog/frontmcp-testing/references/test-tool-unit.md +15 -0
- package/catalog/skills-manifest.json +2849 -32
- package/package.json +2 -2
- package/src/index.d.ts +1 -1
- package/src/index.js.map +1 -1
- package/src/loader.js +0 -1
- package/src/loader.js.map +1 -1
- package/src/manifest.d.ts +36 -1
- package/src/manifest.js +6 -1
- package/src/manifest.js.map +1 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-agent
|
|
3
|
+
description: Create autonomous AI agents that use LLM reasoning to plan and invoke inner tools
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating an Autonomous Agent
|
|
2
7
|
|
|
3
8
|
Agents are autonomous AI entities that use an LLM to reason, plan, and invoke inner tools to accomplish goals. In FrontMCP, agents are TypeScript classes that extend `AgentContext`, decorated with `@Agent`, and registered on a `@FrontMcp` server or inside an `@App`.
|
|
@@ -595,6 +600,16 @@ class DocsAgent extends AgentContext {}
|
|
|
595
600
|
| Agent times out | No timeout or rate limit configured | Add `timeout: { executeMs: 120_000 }` and `rateLimit` to `@Agent` options |
|
|
596
601
|
| Swarm handoff fails | Target agent name does not match any registered agent | Ensure `handoff.agent` matches the `name` of a registered agent in the same scope |
|
|
597
602
|
|
|
603
|
+
## Examples
|
|
604
|
+
|
|
605
|
+
| Example | Level | Description |
|
|
606
|
+
| ---------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------- |
|
|
607
|
+
| [`basic-agent-with-tools`](../examples/create-agent/basic-agent-with-tools.md) | Basic | An autonomous agent that uses inner tools to review GitHub pull requests. |
|
|
608
|
+
| [`custom-multi-pass-agent`](../examples/create-agent/custom-multi-pass-agent.md) | Intermediate | An agent that overrides `execute()` to perform multi-pass LLM reasoning with `this.completion()`. |
|
|
609
|
+
| [`nested-agents-with-swarm`](../examples/create-agent/nested-agents-with-swarm.md) | Advanced | Composing specialized sub-agents and configuring swarm-based handoff between agents. |
|
|
610
|
+
|
|
611
|
+
> See all examples in [`examples/create-agent/`](../examples/create-agent/)
|
|
612
|
+
|
|
598
613
|
## Reference
|
|
599
614
|
|
|
600
615
|
- [Agents Documentation](https://docs.agentfront.dev/frontmcp/servers/agents)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-job
|
|
3
|
+
description: Create long-running background jobs with retry policies, progress tracking, and permissions
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating Jobs
|
|
2
7
|
|
|
3
8
|
Jobs are long-running background tasks with built-in retry policies, progress tracking, and permission controls. Unlike tools (which execute synchronously within a request), jobs run asynchronously and persist their state across retries and restarts.
|
|
@@ -602,6 +607,16 @@ class DataServer {}
|
|
|
602
607
|
| Job times out unexpectedly | Default 5-minute timeout too short | Set `timeout` in `@Job` to a higher value (e.g., `600000` for 10 minutes) |
|
|
603
608
|
| Permission denied error | User lacks required roles or scopes | Verify user has one of the `roles` and all `scopes` defined in `permissions` |
|
|
604
609
|
|
|
610
|
+
## Examples
|
|
611
|
+
|
|
612
|
+
| Example | Level | Description |
|
|
613
|
+
| ------------------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------ |
|
|
614
|
+
| [`basic-report-job`](../examples/create-job/basic-report-job.md) | Basic | A minimal job that generates a report with progress tracking and structured output. |
|
|
615
|
+
| [`job-with-permissions`](../examples/create-job/job-with-permissions.md) | Advanced | A data export job with declarative permission controls, plus a function-style job for simple tasks. |
|
|
616
|
+
| [`job-with-retry`](../examples/create-job/job-with-retry.md) | Intermediate | A job that syncs data from an external API with automatic retry, exponential backoff, and batch progress tracking. |
|
|
617
|
+
|
|
618
|
+
> See all examples in [`examples/create-job/`](../examples/create-job/)
|
|
619
|
+
|
|
605
620
|
## Reference
|
|
606
621
|
|
|
607
622
|
- [Jobs Documentation](https://docs.agentfront.dev/frontmcp/servers/jobs)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-plugin-hooks
|
|
3
|
+
description: Intercept and extend FrontMCP flows using before, after, around, and stage hook decorators
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating Plugins with Flow Lifecycle Hooks
|
|
2
7
|
|
|
3
8
|
Plugins intercept and extend FrontMCP flows using lifecycle hook decorators. Every flow (tool calls, resource reads, prompt gets, etc.) is composed of **stages**, and hooks let you run logic before, after, around, or instead of any stage.
|
|
@@ -58,6 +63,42 @@ const { Stage, Will, Did, Around } = FlowHooksOf('tools:call-tool');
|
|
|
58
63
|
| `http:request` | HTTP request handling |
|
|
59
64
|
| `agents:call-agent` | Agent invocation |
|
|
60
65
|
|
|
66
|
+
## Server Lifecycle Hooks
|
|
67
|
+
|
|
68
|
+
In addition to flow-based hooks, plugins can register callbacks for server lifecycle events. These are not decorator-based — they use the `scope.onServerStarted()` API.
|
|
69
|
+
|
|
70
|
+
### `onServerStarted()`
|
|
71
|
+
|
|
72
|
+
Runs after the HTTP server is fully initialized and listening. Use for warming caches, starting background indexing, or logging readiness.
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { Plugin, DynamicPlugin } from '@frontmcp/sdk';
|
|
76
|
+
|
|
77
|
+
@Plugin({
|
|
78
|
+
name: 'cache-warmer',
|
|
79
|
+
description: 'Warms caches when the server starts',
|
|
80
|
+
providers: [CacheService],
|
|
81
|
+
})
|
|
82
|
+
class CacheWarmerPlugin extends DynamicPlugin<{}> {
|
|
83
|
+
constructor(scope: ScopeEntry) {
|
|
84
|
+
super();
|
|
85
|
+
// Register lifecycle callback
|
|
86
|
+
scope.onServerStarted(async () => {
|
|
87
|
+
const cache = this.get(CacheService);
|
|
88
|
+
await cache.warmAll();
|
|
89
|
+
console.log('Cache warmed successfully');
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Signature:** `scope.onServerStarted(callback: () => void | Promise<void>): void`
|
|
96
|
+
|
|
97
|
+
- Callbacks are stored and executed after `server.start()` completes
|
|
98
|
+
- Supports both sync and async callbacks
|
|
99
|
+
- Multiple callbacks are executed in registration order with `await`
|
|
100
|
+
- Typically used in plugin constructors or provider `onInit()` methods
|
|
101
|
+
|
|
61
102
|
## Pre-Built Hook Type Exports
|
|
62
103
|
|
|
63
104
|
For convenience, FrontMCP exports typed aliases so you do not need to call `FlowHooksOf` directly:
|
|
@@ -328,6 +369,16 @@ Any stage can have `@Will`, `@Did`, `@Stage`, or `@Around` hooks.
|
|
|
328
369
|
| Multiple hooks execute in wrong order | Priorities not set or conflicting | Set explicit `priority` values; higher numbers execute first |
|
|
329
370
|
| `@Stage` replacement causes downstream errors | Return value shape does not match stage contract | Ensure the return matches what the next stage expects (e.g., MCP response format) |
|
|
330
371
|
|
|
372
|
+
## Examples
|
|
373
|
+
|
|
374
|
+
| Example | Level | Description |
|
|
375
|
+
| --------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
376
|
+
| [`basic-logging-plugin`](../examples/create-plugin-hooks/basic-logging-plugin.md) | Basic | Demonstrates a plugin that logs tool execution using `@Will` and `@Did` hook decorators from the pre-built `ToolHook` export. |
|
|
377
|
+
| [`caching-with-around`](../examples/create-plugin-hooks/caching-with-around.md) | Intermediate | Demonstrates wrapping tool execution with an `@Around` hook to implement result caching with TTL-based expiry. |
|
|
378
|
+
| [`tool-level-hooks-and-stage-replacement`](../examples/create-plugin-hooks/tool-level-hooks-and-stage-replacement.md) | Advanced | Demonstrates two advanced patterns: adding `@Will`/`@Did` hooks directly on a `@Tool` class (scoped to that tool only), and using `@Stage` in a plugin to replace a flow stage entirely with a filtered mock. |
|
|
379
|
+
|
|
380
|
+
> See all examples in [`examples/create-plugin-hooks/`](../examples/create-plugin-hooks/)
|
|
381
|
+
|
|
331
382
|
## Reference
|
|
332
383
|
|
|
333
384
|
- [Plugin Hooks Documentation](https://docs.agentfront.dev/frontmcp/plugins/creating-plugins)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-plugin
|
|
3
|
+
description: Build plugins with providers, context extensions, lifecycle hooks, and contributed tools
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Create a FrontMCP Plugin
|
|
2
7
|
|
|
3
8
|
This skill covers building custom plugins for FrontMCP and using all 6 official plugins. Plugins are modular units that extend server behavior through providers, context extensions, lifecycle hooks, and contributed tools/resources/prompts.
|
|
@@ -73,6 +78,47 @@ abstract class DynamicPlugin<TOptions extends object, TInput extends object = TO
|
|
|
73
78
|
- `init()` creates a provider entry for use in `plugins: [...]` arrays
|
|
74
79
|
- `dynamicProviders()` returns providers computed from the input options
|
|
75
80
|
|
|
81
|
+
## Quick Start: Minimal DynamicPlugin
|
|
82
|
+
|
|
83
|
+
The simplest working plugin needs three files: a provider, the plugin class, and registration.
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
// my-greeter.provider.ts
|
|
87
|
+
import { Provider } from '@frontmcp/sdk';
|
|
88
|
+
|
|
89
|
+
@Provider()
|
|
90
|
+
export class GreeterService {
|
|
91
|
+
greet(name: string): string {
|
|
92
|
+
return `Hello, ${name}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
// my-greeter.plugin.ts
|
|
99
|
+
import { Plugin, DynamicPlugin, ProviderType } from '@frontmcp/sdk';
|
|
100
|
+
import { GreeterService } from './providers/my-greeter.provider';
|
|
101
|
+
|
|
102
|
+
@Plugin({ name: 'greeter', exports: [GreeterService] })
|
|
103
|
+
export default class GreeterPlugin extends DynamicPlugin<{ prefix: string }> {
|
|
104
|
+
static override dynamicProviders(opts: { prefix: string }): ProviderType[] {
|
|
105
|
+
return [{ provide: GreeterService, useFactory: () => new GreeterService() }];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
// server.ts
|
|
112
|
+
import { FrontMcp } from '@frontmcp/sdk';
|
|
113
|
+
import GreeterPlugin from './plugins/my-greeter.plugin';
|
|
114
|
+
|
|
115
|
+
@FrontMcp({
|
|
116
|
+
info: { name: 'my-server', version: '1.0.0' },
|
|
117
|
+
plugins: [GreeterPlugin.init({ prefix: 'Hi' })],
|
|
118
|
+
})
|
|
119
|
+
class MyServer {}
|
|
120
|
+
```
|
|
121
|
+
|
|
76
122
|
## Step 1: Create a Simple Plugin
|
|
77
123
|
|
|
78
124
|
The minimal plugin only needs a name:
|
|
@@ -260,11 +306,32 @@ Register with `init()`:
|
|
|
260
306
|
class MyServer {}
|
|
261
307
|
```
|
|
262
308
|
|
|
263
|
-
## Step 5: Extend
|
|
309
|
+
## Step 5: Extend Metadata and Execution Context
|
|
310
|
+
|
|
311
|
+
FrontMCP provides two extension mechanisms for plugins: **metadata augmentation** (add fields to decorators) and **context extensions** (add properties to `this` in tools/resources/prompts).
|
|
264
312
|
|
|
265
|
-
|
|
313
|
+
### All Extensible Metadata Interfaces
|
|
314
|
+
|
|
315
|
+
Plugins can extend these `declare global` interfaces to add custom fields to any decorator:
|
|
316
|
+
|
|
317
|
+
| Interface | Decorator | Example Field |
|
|
318
|
+
| ---------------------------------------- | -------------------------- | ---------------------------- |
|
|
319
|
+
| `ExtendFrontMcpToolMetadata` | `@Tool({...})` | `audit: { enabled: true }` |
|
|
320
|
+
| `ExtendFrontMcpAgentMetadata` | `@Agent({...})` | Inherits from ToolMetadata |
|
|
321
|
+
| `ExtendFrontMcpResourceMetadata` | `@Resource({...})` | `cache: { ttl: 3600 }` |
|
|
322
|
+
| `ExtendFrontMcpResourceTemplateMetadata` | `@ResourceTemplate({...})` | `rateLimit: { max: 100 }` |
|
|
323
|
+
| `ExtendFrontMcpPromptMetadata` | `@Prompt({...})` | `category: 'onboarding'` |
|
|
324
|
+
| `ExtendFrontMcpJobMetadata` | `@Job({...})` | `priority: 'high'` |
|
|
325
|
+
| `ExtendFrontMcpWorkflowMetadata` | `@Workflow({...})` | `retryPolicy: 'exponential'` |
|
|
326
|
+
| `ExtendFrontMcpSkillMetadata` | `@Skill({...})` | `complexity: 'advanced'` |
|
|
327
|
+
| `ExtendFrontMcpLoggerMetadata` | Logger transports | `destination: 'sentry'` |
|
|
328
|
+
|
|
329
|
+
### Metadata Extension Pattern
|
|
330
|
+
|
|
331
|
+
Add custom fields to any decorator via `declare global`:
|
|
266
332
|
|
|
267
333
|
```typescript
|
|
334
|
+
// my-plugin.types.ts
|
|
268
335
|
declare global {
|
|
269
336
|
interface ExtendFrontMcpToolMetadata {
|
|
270
337
|
audit?: {
|
|
@@ -275,7 +342,7 @@ declare global {
|
|
|
275
342
|
}
|
|
276
343
|
```
|
|
277
344
|
|
|
278
|
-
Tools then use
|
|
345
|
+
Tools then use the custom field directly in the decorator:
|
|
279
346
|
|
|
280
347
|
```typescript
|
|
281
348
|
@Tool({
|
|
@@ -287,12 +354,106 @@ class DeleteUserTool extends ToolContext {
|
|
|
287
354
|
}
|
|
288
355
|
```
|
|
289
356
|
|
|
357
|
+
The same pattern works for any of the 9 interfaces above — replace `ExtendFrontMcpToolMetadata` with the target interface.
|
|
358
|
+
|
|
359
|
+
### Context Extension Pattern
|
|
360
|
+
|
|
361
|
+
Add properties like `this.myService` to execution contexts. This requires both TypeScript augmentation and runtime registration.
|
|
362
|
+
|
|
363
|
+
**Part A: TypeScript type declaration** (in a separate `.context-extension.ts` file):
|
|
364
|
+
|
|
365
|
+
```typescript
|
|
366
|
+
// my-plugin.context-extension.ts
|
|
367
|
+
import type { MyService } from './providers/my-service.provider';
|
|
368
|
+
|
|
369
|
+
declare module '@frontmcp/sdk' {
|
|
370
|
+
interface ExecutionContextBase {
|
|
371
|
+
readonly myService: MyService;
|
|
372
|
+
}
|
|
373
|
+
// PromptContext has a separate prototype chain — augment it too
|
|
374
|
+
interface PromptContext {
|
|
375
|
+
readonly myService: MyService;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Part B: Runtime registration** (in the `@Plugin` metadata):
|
|
381
|
+
|
|
382
|
+
```typescript
|
|
383
|
+
@Plugin({
|
|
384
|
+
name: 'my-plugin',
|
|
385
|
+
providers: [MyServiceProvider],
|
|
386
|
+
contextExtensions: [
|
|
387
|
+
{
|
|
388
|
+
property: 'myService',
|
|
389
|
+
token: MyServiceToken,
|
|
390
|
+
errorMessage: 'MyPlugin is not installed. Add it to your app plugins.',
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
})
|
|
394
|
+
export class MyPlugin extends DynamicPlugin<MyPluginOptions> {
|
|
395
|
+
/* ... */
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
The SDK installs lazy getters on both `ExecutionContextBase.prototype` and `PromptContext.prototype` that resolve the DI token on first access.
|
|
400
|
+
|
|
401
|
+
### ContextExtension Interface
|
|
402
|
+
|
|
403
|
+
Each entry in the `contextExtensions` array has these fields:
|
|
404
|
+
|
|
405
|
+
| Field | Type | Required | Description |
|
|
406
|
+
| -------------- | ---------------- | -------- | --------------------------------------------- |
|
|
407
|
+
| `property` | `string` | Yes | Property name accessible as `this.{property}` |
|
|
408
|
+
| `token` | `Token<unknown>` | Yes | DI token to resolve when property is accessed |
|
|
409
|
+
| `errorMessage` | `string` | No | Custom error when plugin is not installed |
|
|
410
|
+
|
|
411
|
+
### Side-Effect Import
|
|
412
|
+
|
|
413
|
+
The TypeScript augmentation file must be imported somewhere in your plugin's barrel export so the type declarations take effect:
|
|
414
|
+
|
|
415
|
+
```typescript
|
|
416
|
+
// index.ts
|
|
417
|
+
import './my-plugin.context-extension'; // side-effect import for type augmentation
|
|
418
|
+
export { MyPlugin } from './my-plugin.plugin';
|
|
419
|
+
export { MyServiceToken } from './my-plugin.symbols';
|
|
420
|
+
```
|
|
421
|
+
|
|
290
422
|
---
|
|
291
423
|
|
|
292
424
|
## Official Plugins
|
|
293
425
|
|
|
294
426
|
For official plugin installation, configuration, and examples, see the **official-plugins** skill. FrontMCP provides 6 official plugins: CodeCall, Remember, Approval, Cache, Feature Flags, and Dashboard. Install individually or via `@frontmcp/plugins` (meta-package).
|
|
295
427
|
|
|
428
|
+
## Recommended Folder Structure
|
|
429
|
+
|
|
430
|
+
```text
|
|
431
|
+
plugins/
|
|
432
|
+
my-plugin/
|
|
433
|
+
index.ts # Barrel exports: plugin, tokens, types, side-effect import
|
|
434
|
+
my-plugin.plugin.ts # Plugin class extending DynamicPlugin
|
|
435
|
+
my-plugin.types.ts # Options Zod schema, TypeScript types, interfaces
|
|
436
|
+
my-plugin.symbols.ts # DI tokens: export const MY_TOKEN: Token<T> = Symbol('...')
|
|
437
|
+
my-plugin.context-extension.ts # Module augmentation (declare module '@frontmcp/sdk')
|
|
438
|
+
providers/
|
|
439
|
+
index.ts # Barrel for providers
|
|
440
|
+
my-service.provider.ts # @Provider class with business logic
|
|
441
|
+
my-store-memory.provider.ts # In-memory store implementation
|
|
442
|
+
my-store-redis.provider.ts # Redis store implementation (optional)
|
|
443
|
+
tools/ # Optional — only if plugin provides tools
|
|
444
|
+
index.ts
|
|
445
|
+
my-action.tool.ts # @Tool class registered via @Plugin({ tools: [...] })
|
|
446
|
+
__tests__/
|
|
447
|
+
my-plugin.spec.ts # Plugin tests
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Key files explained:**
|
|
451
|
+
|
|
452
|
+
- `index.ts` — Must import the context extension file as a side effect: `import './my-plugin.context-extension'`
|
|
453
|
+
- `symbols.ts` — All DI tokens in one place. Other files import from here, not from the plugin class
|
|
454
|
+
- `context-extension.ts` — `declare module '@frontmcp/sdk' { interface ExecutionContextBase { readonly myProp: T } }`
|
|
455
|
+
- `plugin.ts` — The `@Plugin()` decorated class. Lists `providers`, `exports`, `contextExtensions`, `tools`
|
|
456
|
+
|
|
296
457
|
## Common Patterns
|
|
297
458
|
|
|
298
459
|
| Pattern | Correct | Incorrect | Why |
|
|
@@ -316,7 +477,9 @@ For official plugin installation, configuration, and examples, see the **officia
|
|
|
316
477
|
|
|
317
478
|
- [ ] Module augmentation file exists with `declare module '@frontmcp/sdk'` block
|
|
318
479
|
- [ ] Augmented properties are `readonly` on `ExecutionContextBase`
|
|
319
|
-
- [ ]
|
|
480
|
+
- [ ] `PromptContext` is augmented alongside `ExecutionContextBase` for context extensions
|
|
481
|
+
- [ ] `declare global` block exists for each metadata extension interface used
|
|
482
|
+
- [ ] Augmentation file is imported (side-effect import) in the plugin barrel export
|
|
320
483
|
|
|
321
484
|
### Runtime
|
|
322
485
|
|
|
@@ -327,13 +490,25 @@ For official plugin installation, configuration, and examples, see the **officia
|
|
|
327
490
|
|
|
328
491
|
## Troubleshooting
|
|
329
492
|
|
|
330
|
-
| Problem
|
|
331
|
-
|
|
|
332
|
-
| `this.auditLog` has type `any` or is unrecognized
|
|
333
|
-
| Circular dependency error at startup
|
|
334
|
-
| Provider not found in tool context
|
|
335
|
-
| Hooks fire for unrelated apps in gateway
|
|
336
|
-
| `DynamicPlugin.init()` options ignored
|
|
493
|
+
| Problem | Cause | Solution |
|
|
494
|
+
| ---------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
495
|
+
| `this.auditLog` has type `any` or is unrecognized | Module augmentation file not imported | Add side-effect import: `import './audit-log.context-extension'` in plugin file |
|
|
496
|
+
| Circular dependency error at startup | Calling `installExtension()` at module top level | Remove manual installation; use `contextExtensions` metadata array instead |
|
|
497
|
+
| Provider not found in tool context | Provider not listed in plugin `exports` | Add the provider to both `providers` and `exports` arrays |
|
|
498
|
+
| Hooks fire for unrelated apps in gateway | Plugin `scope` set to `'server'` | Change to `scope: 'app'` (default) unless server-wide behavior is intended |
|
|
499
|
+
| `DynamicPlugin.init()` options ignored | Overriding constructor without calling `super()` | Ensure constructor calls `super()` and merges defaults properly |
|
|
500
|
+
| `ProviderNotRegisteredError` for context extension | Token in `contextExtensions` not in `providers` | Ensure the token used in `contextExtensions[].token` is registered in the plugin's `providers` array. Use `{ provide: MyToken, useClass: MyService }` or list the class directly. If using `dynamicProviders()`, return the provider there |
|
|
501
|
+
| Provider works in tools but not in context extension | Using class reference instead of Symbol token | Create a typed `Token<T> = Symbol('name')` in `symbols.ts`, use it in both `providers` and `contextExtensions`. Direct class references can fail if not constructable without dependencies |
|
|
502
|
+
|
|
503
|
+
## Examples
|
|
504
|
+
|
|
505
|
+
| Example | Level | Description |
|
|
506
|
+
| --------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------- |
|
|
507
|
+
| [`basic-plugin-with-provider`](../examples/create-plugin/basic-plugin-with-provider.md) | Basic | A minimal plugin that contributes an injectable service via the `providers` and `exports` arrays. |
|
|
508
|
+
| [`configurable-dynamic-plugin`](../examples/create-plugin/configurable-dynamic-plugin.md) | Advanced | A plugin that accepts runtime configuration via `DynamicPlugin` and extends decorator metadata with custom fields. |
|
|
509
|
+
| [`plugin-with-context-extension`](../examples/create-plugin/plugin-with-context-extension.md) | Intermediate | A plugin that adds a `this.auditLog` property to all execution contexts using context extensions and module augmentation. |
|
|
510
|
+
|
|
511
|
+
> See all examples in [`examples/create-plugin/`](../examples/create-plugin/)
|
|
337
512
|
|
|
338
513
|
## Reference
|
|
339
514
|
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-prompt
|
|
3
|
+
description: Define reusable AI interaction patterns that produce structured message sequences
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating MCP Prompts
|
|
2
7
|
|
|
3
8
|
Prompts define reusable AI interaction patterns in the MCP protocol. They produce structured message sequences that clients use to guide LLM conversations. In FrontMCP, prompts are classes extending `PromptContext`, decorated with `@Prompt`, that return `GetPromptResult` objects.
|
|
@@ -64,8 +69,10 @@ class CodeReviewPrompt extends PromptContext {
|
|
|
64
69
|
The `@Prompt` decorator accepts:
|
|
65
70
|
|
|
66
71
|
- `name` (required) -- unique prompt name
|
|
72
|
+
- `title` (optional) -- human-readable display title for UIs (if omitted, `name` is used)
|
|
67
73
|
- `description` (optional) -- human-readable description
|
|
68
74
|
- `arguments` (optional) -- array of `PromptArgument` objects
|
|
75
|
+
- `icons` (optional) -- array of Icon objects for UI representation (per MCP spec)
|
|
69
76
|
|
|
70
77
|
### PromptArgument Structure
|
|
71
78
|
|
|
@@ -430,6 +437,16 @@ This creates the prompt file, spec file, and updates barrel exports.
|
|
|
430
437
|
| Type error on `execute()` return | Returning plain string instead of `GetPromptResult` | Wrap return in `{ messages: [{ role: 'user', content: { type: 'text', text: '...' } }] }` |
|
|
431
438
|
| `this.get(TOKEN)` throws DependencyNotFoundError | Provider not registered in scope | Register provider in `providers` array of `@App` or `@FrontMcp` |
|
|
432
439
|
|
|
440
|
+
## Examples
|
|
441
|
+
|
|
442
|
+
| Example | Level | Description |
|
|
443
|
+
| ----------------------------------------------------------------------------------- | ------------ | ---------------------------------------------------------------------------------------------------- |
|
|
444
|
+
| [`basic-prompt`](../examples/create-prompt/basic-prompt.md) | Basic | A simple prompt that generates a structured code review message from user-provided arguments. |
|
|
445
|
+
| [`dynamic-rag-prompt`](../examples/create-prompt/dynamic-rag-prompt.md) | Advanced | A prompt that queries a knowledge base via DI to build context-aware messages at runtime. |
|
|
446
|
+
| [`multi-turn-debug-session`](../examples/create-prompt/multi-turn-debug-session.md) | Intermediate | A prompt that uses alternating user/assistant messages to guide a structured debugging conversation. |
|
|
447
|
+
|
|
448
|
+
> See all examples in [`examples/create-prompt/`](../examples/create-prompt/)
|
|
449
|
+
|
|
433
450
|
## Reference
|
|
434
451
|
|
|
435
452
|
- [Prompts Documentation](https://docs.agentfront.dev/frontmcp/servers/prompts)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-provider
|
|
3
|
+
description: Create singleton DI providers for database pools, API clients, and shared services
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating Providers (Dependency Injection)
|
|
2
7
|
|
|
3
8
|
Providers are singleton services — database pools, API clients, config objects — that tools, resources, prompts, and agents can access via `this.get(token)`.
|
|
@@ -262,6 +267,15 @@ frontmcp dev
|
|
|
262
267
|
| Type mismatch on `this.get(TOKEN)` | Token typed with wrong interface | Ensure `Token<T>` generic matches the provider's implemented interface |
|
|
263
268
|
| Provider not destroyed on shutdown | Missing `onDestroy()` method | Implement `onDestroy()` to close connections and release resources |
|
|
264
269
|
|
|
270
|
+
## Examples
|
|
271
|
+
|
|
272
|
+
| Example | Level | Description |
|
|
273
|
+
| ------------------------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------- |
|
|
274
|
+
| [`basic-database-provider`](../examples/create-provider/basic-database-provider.md) | Basic | A provider that manages a database connection pool with `onInit()` and `onDestroy()` lifecycle hooks. |
|
|
275
|
+
| [`config-and-api-providers`](../examples/create-provider/config-and-api-providers.md) | Intermediate | A configuration provider with readonly environment settings and an HTTP API client provider. |
|
|
276
|
+
|
|
277
|
+
> See all examples in [`examples/create-provider/`](../examples/create-provider/)
|
|
278
|
+
|
|
265
279
|
## Reference
|
|
266
280
|
|
|
267
281
|
- [Providers Documentation](https://docs.agentfront.dev/frontmcp/extensibility/providers)
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-resource
|
|
3
|
+
description: Expose data to AI clients via URI-based static resources and parameterized templates
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Creating MCP Resources
|
|
2
7
|
|
|
3
8
|
Resources expose data to AI clients through URI-based access following the MCP protocol. FrontMCP supports two kinds: **static resources** with fixed URIs (`@Resource`) and **resource templates** with parameterized URI patterns (`@ResourceTemplate`).
|
|
@@ -31,9 +36,11 @@ Resources expose data to AI clients through URI-based access following the MCP p
|
|
|
31
36
|
The `@Resource` decorator accepts:
|
|
32
37
|
|
|
33
38
|
- `name` (required) -- unique resource name
|
|
39
|
+
- `title` (optional) -- human-readable display title for UIs (if omitted, `name` is used)
|
|
34
40
|
- `uri` (required) -- static URI with a valid scheme per RFC 3986
|
|
35
41
|
- `description` (optional) -- human-readable description
|
|
36
42
|
- `mimeType` (optional) -- MIME type of the resource content
|
|
43
|
+
- `icons` (optional) -- array of Icon objects for UI representation (per MCP spec)
|
|
37
44
|
|
|
38
45
|
### Class-Based Pattern
|
|
39
46
|
|
|
@@ -138,9 +145,11 @@ Supported return shapes:
|
|
|
138
145
|
The `@ResourceTemplate` decorator accepts:
|
|
139
146
|
|
|
140
147
|
- `name` (required) -- unique resource template name
|
|
148
|
+
- `title` (optional) -- human-readable display title for UIs (if omitted, `name` is used)
|
|
141
149
|
- `uriTemplate` (required) -- URI pattern with `{paramName}` placeholders (RFC 6570 style)
|
|
142
150
|
- `description` (optional) -- human-readable description
|
|
143
151
|
- `mimeType` (optional) -- MIME type of the resource content
|
|
152
|
+
- `icons` (optional) -- array of Icon objects for UI representation (per MCP spec)
|
|
144
153
|
|
|
145
154
|
### Class-Based Pattern
|
|
146
155
|
|
|
@@ -426,6 +435,108 @@ nx generate @frontmcp/nx:resource
|
|
|
426
435
|
|
|
427
436
|
This creates the resource file, spec file, and updates barrel exports.
|
|
428
437
|
|
|
438
|
+
## Resource Argument Autocompletion
|
|
439
|
+
|
|
440
|
+
Resource templates with parameterized URIs can provide autocompletion for their arguments. This is useful when template parameters represent dynamic values that can be searched or enumerated, such as user IDs, product names, or project slugs.
|
|
441
|
+
|
|
442
|
+
### When to Use
|
|
443
|
+
|
|
444
|
+
- Template parameters reference entities that exist in a database or external service (user IDs, product names, etc.)
|
|
445
|
+
- Clients benefit from discovering valid parameter values without prior knowledge
|
|
446
|
+
- The parameter space is searchable or enumerable given a partial input string
|
|
447
|
+
|
|
448
|
+
### Types
|
|
449
|
+
|
|
450
|
+
The autocompletion API uses two types from `@frontmcp/sdk`:
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
interface ResourceCompletionResult {
|
|
454
|
+
values: string[];
|
|
455
|
+
total?: number;
|
|
456
|
+
hasMore?: boolean;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
type ResourceArgumentCompleter = (partial: string) => Promise<ResourceCompletionResult> | ResourceCompletionResult;
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
- `values` -- the list of matching completions for the partial input
|
|
463
|
+
- `total` -- optional total number of matches (useful when `values` is a truncated subset)
|
|
464
|
+
- `hasMore` -- optional flag indicating additional matches exist beyond what was returned
|
|
465
|
+
|
|
466
|
+
### How to Implement
|
|
467
|
+
|
|
468
|
+
There are two approaches, both with full DI access via `this.get()`:
|
|
469
|
+
|
|
470
|
+
#### Convention-Based (Preferred)
|
|
471
|
+
|
|
472
|
+
Define a method named `${argName}Completer` on your `ResourceContext` subclass. The framework discovers it automatically -- no override needed.
|
|
473
|
+
|
|
474
|
+
```typescript
|
|
475
|
+
@ResourceTemplate({
|
|
476
|
+
name: 'user-profile',
|
|
477
|
+
description: 'User profile by ID',
|
|
478
|
+
uriTemplate: 'users://{userId}/profile',
|
|
479
|
+
mimeType: 'application/json',
|
|
480
|
+
})
|
|
481
|
+
class UserProfileResource extends ResourceContext<{ userId: string }> {
|
|
482
|
+
async execute(uri: string, params: { userId: string }) {
|
|
483
|
+
const user = await this.get(UserService).findById(params.userId);
|
|
484
|
+
return { id: user.id, name: user.name, email: user.email };
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
async userIdCompleter(partial: string): Promise<ResourceCompletionResult> {
|
|
488
|
+
const users = await this.get(UserService).search(partial);
|
|
489
|
+
return { values: users.map((u) => u.id), total: users.length };
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
The naming convention is `${argName}Completer` -- for a URI parameter `{accountName}`, define `accountNameCompleter(partial)`.
|
|
495
|
+
|
|
496
|
+
#### Override-Based
|
|
497
|
+
|
|
498
|
+
Override the `getArgumentCompleter(argName)` method for dynamic dispatch across multiple parameters. Return a completer function for argument names you support, or `null` for unknown arguments.
|
|
499
|
+
|
|
500
|
+
```typescript
|
|
501
|
+
getArgumentCompleter(argName: string): ResourceArgumentCompleter | null {
|
|
502
|
+
if (argName === 'userId') {
|
|
503
|
+
return async (partial) => {
|
|
504
|
+
const users = await this.get(UserService).search(partial);
|
|
505
|
+
return { values: users.map((u) => u.id), total: users.length };
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
return null;
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
Convention-based completers take priority when both are present on the same class.
|
|
513
|
+
|
|
514
|
+
### Complete Example
|
|
515
|
+
|
|
516
|
+
A user profile template resource that autocompletes user IDs using the convention-based approach:
|
|
517
|
+
|
|
518
|
+
```typescript
|
|
519
|
+
@ResourceTemplate({
|
|
520
|
+
name: 'user-profile',
|
|
521
|
+
description: 'User profile by ID',
|
|
522
|
+
uriTemplate: 'users://{userId}/profile',
|
|
523
|
+
mimeType: 'application/json',
|
|
524
|
+
})
|
|
525
|
+
class UserProfileResource extends ResourceContext<{ userId: string }> {
|
|
526
|
+
async execute(uri: string, params: { userId: string }) {
|
|
527
|
+
const user = await this.get(UserService).findById(params.userId);
|
|
528
|
+
return { id: user.id, name: user.name, email: user.email };
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
async userIdCompleter(partial: string): Promise<ResourceCompletionResult> {
|
|
532
|
+
const users = await this.get(UserService).search(partial);
|
|
533
|
+
return { values: users.map((u) => u.id), total: users.length };
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
When a client requests completions for the `userId` parameter with a partial string like `"al"`, the completer queries the user service and returns matching IDs.
|
|
539
|
+
|
|
429
540
|
## Common Patterns
|
|
430
541
|
|
|
431
542
|
| Pattern | Correct | Incorrect | Why |
|
|
@@ -453,6 +564,12 @@ This creates the resource file, spec file, and updates barrel exports.
|
|
|
453
564
|
- [ ] Binary resources return valid base64 in the `blob` field
|
|
454
565
|
- [ ] DI dependencies resolve correctly via `this.get()`
|
|
455
566
|
|
|
567
|
+
### Autocompletion
|
|
568
|
+
|
|
569
|
+
- [ ] Template resources with dynamic params define `${argName}Completer` methods or override `getArgumentCompleter()`
|
|
570
|
+
- [ ] Completer returns `{ values, total?, hasMore? }` matching the partial input
|
|
571
|
+
- [ ] Completers use `this.get()` for DI (both convention and override patterns support full DI)
|
|
572
|
+
|
|
456
573
|
## Troubleshooting
|
|
457
574
|
|
|
458
575
|
| Problem | Cause | Solution |
|
|
@@ -463,6 +580,16 @@ This creates the resource file, spec file, and updates barrel exports.
|
|
|
463
580
|
| Binary content is garbled | Returning raw buffer in `text` field | Use `blob: buffer.toString('base64')` instead of `text` for binary data |
|
|
464
581
|
| `this.get(TOKEN)` throws DependencyNotFoundError | Provider not registered in scope | Register provider in `providers` array of `@App` or `@FrontMcp` |
|
|
465
582
|
|
|
583
|
+
## Examples
|
|
584
|
+
|
|
585
|
+
| Example | Level | Description |
|
|
586
|
+
| ------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------ |
|
|
587
|
+
| [`basic-static-resource`](../examples/create-resource/basic-static-resource.md) | Basic | A static resource that exposes application configuration at a fixed URI. |
|
|
588
|
+
| [`binary-and-multi-content`](../examples/create-resource/binary-and-multi-content.md) | Advanced | A resource serving binary blob data and a resource returning multiple content items. |
|
|
589
|
+
| [`parameterized-template`](../examples/create-resource/parameterized-template.md) | Intermediate | A resource template with typed URI parameters and argument autocompletion. |
|
|
590
|
+
|
|
591
|
+
> See all examples in [`examples/create-resource/`](../examples/create-resource/)
|
|
592
|
+
|
|
466
593
|
## Reference
|
|
467
594
|
|
|
468
595
|
- [Resources Documentation](https://docs.agentfront.dev/frontmcp/servers/resources)
|