-
Couldn't load subscription status.
- Fork 1k
feat(cloudwatch-appsignals-mcp-server): Add get_enablement_guide MCP tool #1585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new get_enablement_guide MCP tool to help AI assistants automatically retrieve and follow Application Signals enablement instructions. The tool accepts platform, language, and directory paths as inputs, validates them, and returns an AI-friendly enablement guide with context-specific instructions.
Key Changes:
- Introduces the
get_enablement_guidefunction with parameter validation and path resolution - Creates directory structure for storing platform/language-specific enablement guides
- Implements comprehensive test coverage for validation, error handling, and successful guide retrieval
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
awslabs/cloudwatch_appsignals_mcp_server/enablement_tools.py |
Core implementation of the get_enablement_guide function with validation logic and template loading |
tests/test_enablement_tools.py |
Unit tests covering invalid inputs, missing directories, and successful guide fetching |
enablement_guides/templates/ec2/ec2-python-enablement.md |
Placeholder markdown file for EC2+Python enablement guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| context = f"""# Application Signals Enablement Guide | ||
|
|
||
| ## Context | ||
|
|
||
| **Platform:** {platform} | ||
| **Language:** {language} | ||
| **IaC Directory (absolute path):** `{iac_full_path}` | ||
| **Application Directory (absolute path):** `{app_full_path}` | ||
|
|
||
| ## Instructions | ||
|
|
||
| 1. Use the ABSOLUTE PATHS above when reading and writing files | ||
| 2. **IMPORTANT:** Only modify the IaC code or Dockerfiles. Actual application code should not be modified. | ||
| Read application files if needed to understand the setup, but do not modify them. | ||
| 3. Follow the step-by-step enablement guide below to enable Application Signals | ||
|
|
||
| --- | ||
| """ |
Copilot
AI
Oct 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The multi-line string has inconsistent leading whitespace that will be included in the output. Lines 98-112 have 8 spaces of indentation that will appear in the final string. Either use textwrap.dedent() to remove leading whitespace, or align the string content to the left margin of the triple quotes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1585 +/- ##
=======================================
Coverage 89.50% 89.50%
=======================================
Files 725 726 +1
Lines 51174 51221 +47
Branches 8193 8200 +7
=======================================
+ Hits 45801 45845 +44
- Misses 3461 3464 +3
Partials 1912 1912 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bd78c95 to
4e63eb4
Compare
Fixes
Summary
Adding new
get_enablement_guideMCP tool. The goal of this tool is to fetch the appropriate enablement guide for AI Assistants to correctly follow Application Signals enablement steps. Currently, these AI-friendly enablement guides will be hosted in this MCP repo. Long-term, we aim to replace our public documentation entirely with these new enablement guides.Changes
get_enablement_guidetool inenablement_tools.pyenablement_guides/templates/directory structure for markdown guidesUser experience
Before:
Users had to manually feed relevant pieces of the enablement docs in small chunks to AI Assistants because the public documentation is not AI-friendly. Feeding the entire documentation to the AI assistant led to poor and inconsistent enablement results.
After:
With a single query like:
The AI assistant will now automatically retrieve the relevant enablement guide based on the context and follow the enablement instructions. The end result is customers will have AI-generated changes to their IaC code that they can deploy and start seeing Application Signals telemetry.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (N)
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.