Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12665Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12665" |
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to include environment variables in the resource graph JSON output for AI/MCP tools. This allows AI assistants to access configured environment variables when analyzing application resources.
Key changes:
- Added an optional
includeEnvironmentVariablesparameter toGetResponseGraphJsonmethod - Updated the MCP
list_resourcestool to include environment variables in its output - Updated the tool description to reflect the new capability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Aspire.Dashboard/Model/Assistant/AIHelpers.cs | Added includeEnvironmentVariables parameter and logic to conditionally include environment variables in resource graph JSON |
| src/Aspire.Dashboard/Mcp/AspireResourceMcpTools.cs | Updated list_resources tool to request environment variables and updated its description |
|
My recommendation would be to start with names only, this will handle the majority of the needs. At least until there is a way to opt-in for also sending values. And without it what about using regexes to categorize the values and return patterns instead of the actual values, either name of the format or format with placeholders (redacted segments that are not special chars / separators).
|
|
Updated to names only. And added a sentence to results to explain that |
|
Waiting on approve... |
sebastienros
left a comment
There was a problem hiding this comment.
Have you tried the same kind of demo as @maddymontaquila but without the screenshot?
|
I did! |
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/19121393650 |
Description
Make resource env vars available in
list_resources.Example of env var values:

Alternative ideas:
get_resource_env_vartool call that takes a resource name and env var name, and returns the value.Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate