microsoft / microsoft/AL

al_symbolsearch fails after al_addproject

Open
#8,227 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted bug
Dominant language
PowerShell
Stars
881
Forks
285
Avg merge
3d 36m
Merged PRs (30d)
1

Description

Please include the following with each issue:

1. Describe the bug
We try to use Copilot Cloud Agent or Copilot CLI with the al-tool mcp server and have issues with our multi-app repos
al_symbolsearch fails when run after a al_addproject and a al_downloadsymbols

✗ al_symbolsearch (MCP: almcp) · parameters: {…}
Γöö MCP server 'almcp': An error occurred invoking 'al_symbolsearch'.

when the mcp server is started with the repo root as project (we do not want to hardcode project paths in the mcp config in the github repo copilot settings) it needs to first load the project via al_addproject. Then later on when the symbol search is triggered it fails. when restarting the mcp it magically succeeds so there seems to be some issues with caching / different behaviour when downloading symbols vs calling addproject

2. To Reproduce

  1. Delete the .alpackages folder in the AL project
  2. Start/restart the AL MCP server
  3. Call al_addproject → succeeds, but returns 0 symbols
  4. Call al_downloadsymbols (globalSourcesOnly=true) → succeeds, 6 packages downloaded
  5. Call al_addproject again
  6. Call al_symbolsearch → MCP error / 0 results

As said when restarting the mcp via /mcp reload the symbolsearch is working fine after calling addproject

i reproduced this with github copilot cli (on windows)

here is the mcp config

{
  "mcpServers": {
    "almcp": {
      "type": "stdio",
      "command": "al",
      "tools": [
        "*"
      ],
      "args": [
        "launchmcpserver"
      ]
    }
  }
}
AL code snippet that demonstrates the issue or a link to a code repository the developers can easily pull down to recreate the issue locally.

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior
A clear and concise description of what you expected to happen.

4. Actual behavior
A clear and concise description of what happened accompanied by images, animations, or a link to a video showing the issue occurring

5. Versions:

  • AL Language: latest prerelease
  • Visual Studio Code: -
  • Business Central: -
  • List of Visual Studio Code extensions that you have installed: -
  • Operating System:
    • Windows
    • Linux
    • MacOS
Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Internal work item: AB#634193

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce on Windows by deleting .alpackages, starting the MCP server with the shown launchmcpserver configuration, then running al_addproject, al_downloadsymbols, al_addproject, and al_symbolsearch. Compare this sequence with /mcp reload; done means symbol search returns the downloaded symbols without restarting the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, vscode
Domain
cli, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.