Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Conversation

colbytimm
Copy link
Contributor

What does this PR do?

  • Introduce support for Azure Function App with the command for listing the function apps in a subscription.

Sample run

image

GitHub issue number?

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
    • Spelling check passes: .\eng\common\spelling\Invoke-Cspell.ps1
  • For MCP tool changes, updated:
    • Updated README.md documentation
    • Updated command list in /docs/azmcp-commands.md
    • Updated test prompts in /e2eTests/e2eTestPrompts.md
  • 👉 For Community (non-Azure team member) PRs:
    • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
    • Manual tests run: added comment /azp run azure - mcp to run Live Test Pipeline

@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 19:54
@colbytimm colbytimm requested review from a team as code owners August 5, 2025 19:54
Copy link
Contributor

@Copilot Copilot AI left a 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 introduces Azure Function App support to the Azure MCP server, adding a list command to enumerate function apps within a subscription. The implementation follows the established patterns used by other Azure services in the codebase.

Key changes:

  • New Function App area with complete list functionality
  • Integration tests and unit tests with proper test infrastructure
  • Documentation updates including README and command reference

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
core/src/AzureMcp.Cli/Program.cs Registers the new FunctionAppSetup area
areas/functionApp/src/AzureMcp.FunctionApp/* Complete Function App implementation with service, commands, models, and options
areas/functionApp/tests/* Comprehensive unit and live test coverage with Bicep test resources
docs/azmcp-commands.md Documentation for the new functionapp list command
e2eTests/e2eTestPrompts.md Test prompts for the new Function App functionality
README.md Updated service table to include Function App
Directory.Packages.props Added Azure.ResourceManager.AppService package
AzureMcp.sln Solution file updates for new projects
.vscode/cspell.json Spelling dictionary updates for Function App terms
.github/CODEOWNERS Code ownership for Function App area
Comments suppressed due to low confidence (3)

areas/functionApp/src/AzureMcp.FunctionApp/Models/FunctionApp.cs:6

  • The class name 'FunctionAppModel' is inconsistent with the file name 'FunctionApp.cs'. Either rename the file to 'FunctionAppModel.cs' or rename the class to 'FunctionApp'.
public class FunctionAppModel

areas/functionApp/tests/test-resources.bicep:138

  • The API version '2018-01-01-preview' for roleDefinitions is outdated. Consider using a more recent stable version like '2022-04-01'.
resource websiteContributorRoleDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {

areas/functionApp/tests/test-resources.bicep:157

  • The API version '2018-01-01-preview' for roleDefinitions is outdated. Consider using a more recent stable version like '2022-04-01'.
resource blobContributorRoleDefinition 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {

@colbytimm
Copy link
Contributor Author

@microsoft-github-policy-service agree

@jongio
Copy link
Member

jongio commented Aug 11, 2025

/azp run azure - mcp

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jongio
Copy link
Member

jongio commented Aug 11, 2025

@jongio Is this ready for re-approvals or are there still outstanding conversations RE codeowners?

We had a CI system change late last week. Let me rerun and to make sure we're good. Thanks

@colbytimm
Copy link
Contributor Author

@jongio Looks like we will need another approver New changes require approval from someone other than jongio because they were the last pusher.

Copy link
Contributor Author

@colbytimm colbytimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @alzimmermsft. Made some updates based on your feedback.

@colbytimm colbytimm requested a review from jongio August 13, 2025 01:15
@jongio jongio enabled auto-merge (squash) August 13, 2025 16:02
@jongio
Copy link
Member

jongio commented Aug 13, 2025

/azp run azure - mcp

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jongio jongio merged commit f817906 into Azure:main Aug 13, 2025
27 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server (OLD) Aug 13, 2025
@joshfree
Copy link
Member

Why did we call the new command group functionapp rather than functions?

@colbytimm
Copy link
Contributor Author

@joshfree Fair point. Looking at MS docs (example: https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview) they reference them as Azure Functions, so the group being named functions make sense. I'm going to be creating a new get command and can include this improvement there.

@colbytimm
Copy link
Contributor Author

@joshfree Thinking about it more...maybe functionapp makes sense because the functionapp is the container for your functions. So functionapp is the parent level and therefore the root command group.

chidozieononiwu pushed a commit to chidozieononiwu/azure-mcp that referenced this pull request Aug 18, 2025
* Add custom words for function app to cspell configuration

* Scaffold and setup Function app with list command

* Add test setup bicep

* Add unit tests for list command

* Add live tests

* Add Azure Function App operations and test prompts

* Add "azurewebsites" to cspell dictionary and update README with Function App management instructions

* Fix formatting

* Remove unnecessary comments

* Update FunctionAppListCommandTests to include ResourceGroupName in expected function app list

* Update codeowners

* Add additional test prompt for azmcp-aks-functionapp-list in e2eTestPrompts.md

* Fix typo for function app e2e tests

* Add additional words to cspell configuration for content connection strings from bicep

* Update FunctionAppListCommand to inherit BaseFunctionAppCommand. Override ToolMetadata instead of using the attributes on ExecuteAsync.

* Update subscription parameter name. Update cacheKey to remove unnecessary cache key type.

* Update changelog to include function app list command

* Rename areas directory to `functionapp`

* Remove duplicate

* Fix casing in function app directory paths in solution file

* Update .github/CODEOWNERS

* Update .github/CODEOWNERS

* Update .github/CODEOWNERS

* Update .github/CODEOWNERS

* Remove base function app options since they are not necessary and extend SubscriptionOptions for the list options.

* Remove option definition as it's not necessary for the list command.

* Update command group description to align with other areas.

* Refactor BaseFunctionAppCommand to use SubscriptionOptions and update FunctionAppListOptions to include necessary using directive.

* Update FunctionApp to be record and update references and unit tests.

* Remove SubscriptionId from FunctionAppInfo and update related tests

* Refactor FunctionAppInfo to include JsonPropertyName attributes for serialization

* Update Azure.ResourceManager.AppService package version to 1.4.1

* Remove telemetry tag based on consolidation change in Azure#935

---------

Co-authored-by: Jon Gallant <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants