Skip to content

al_symbolsearch fails after al_addproject #8227

@marknitek

Description

@marknitek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions