Skip to content

Commit 0908781

Browse files
authored
Merge pull request #14 from AccessCodeLib/feature/accept-accda
Accept .accda database paths
2 parents 34e2f2a + a27df39 commit 0908781

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
55

66
## [Unreleased]
77

8+
### Added
9+
- Database paths with the extension .accda (Access add-in files) are accepted by all tools.
10+
811
## [0.2.0] - 2026-11-18
912

1013
### Added

‎skills/aclib-import/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Only the tools of the `aclib-import` MCP server are used.
1414
- ACLib Import Wizard with automation API is installed (`aclib_get_version` returns `api >= 1`).
1515
- Add-in **and** target database are in trusted locations. Otherwise a security prompt blocks the
1616
call or code is disabled.
17-
- `database_path` is the full path of the target `.accdb`/`.mdb`.
17+
- `database_path` is the full path of the target `.accdb`/`.accda`/`.mdb`.
1818

1919
## Tools
2020

‎src/aclib_import_mcp/server.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
Mode = Literal["missing", "all", "selected"]
3939
Source = Literal["config", "local", "github"]
4040

41-
DATABASE_EXTENSIONS = {".accdb", ".mdb"}
41+
DATABASE_EXTENSIONS = {".accdb", ".accda", ".mdb"}
4242
AC_CMD_COMPILE_AND_SAVE_ALL_MODULES = 126
4343
NOT_COMPILED_MESSAGE = (
4444
"Project does not compile; open the VBA editor (Debug > Compile) to see the error."
@@ -48,7 +48,7 @@
4848

4949
DatabasePath = Annotated[
5050
str,
51-
Field(description="Full path of the target Access database (.accdb/.mdb)."),
51+
Field(description="Full path of the target Access database (.accdb/.accda/.mdb)."),
5252
]
5353
Files = Annotated[
5454
list[str],
@@ -96,7 +96,7 @@ def validate_database_path(database_path: str) -> str:
9696
if not path.is_absolute():
9797
raise ToolError(f"database_path must be an absolute path: {database_path!r}")
9898
if path.suffix.lower() not in DATABASE_EXTENSIONS:
99-
raise ToolError(f"database_path must be an .accdb or .mdb file: {database_path!r}")
99+
raise ToolError(f"database_path must be an .accdb, .accda or .mdb file: {database_path!r}")
100100
return str(path)
101101

102102

‎tests/test_server.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ def test_validate_database_path_rejects(path):
9696
server.validate_database_path(path)
9797

9898

99+
@pytest.mark.parametrize("extension", [".accdb", ".accda", ".mdb", ".ACCDA"])
100+
def test_validate_database_path_accepts(extension):
101+
path = rf"C:\Data\test{extension}"
102+
assert server.validate_database_path(path) == path
103+
104+
99105
def test_get_version(use_worker):
100106
app = FakeApp({"GetVersion": VERSION_OK})
101107
use_worker(FakeWorker(app))

0 commit comments

Comments
 (0)