Summary
The sdef interrogator uses the <dictionary title="..."> attribute as the application name in the discovery bundle. This produces awkward names like "Mail Terminology" instead of "Mail", which then propagate through the entire pipeline to the generated package name (@mcpaql/generated-Mail Terminology-adapter).
Root Cause
In src/sdef-parser.ts, parseSdefFile extracts the title attribute from the root <dictionary> element and stores it as application. The sdef CLI then uses this as source.name in the discovery bundle.
Apple's sdef files use descriptive dictionary titles:
- Mail →
"Mail Terminology"
- Other apps may use
"Foo Scripting", "Bar Suite", etc.
Expected Behavior
The interrogator should prefer the app name derived from the --app flag or the bundle path, falling back to the dictionary title only if neither is available.
Priority order:
--app CLI argument (e.g., "Mail")
- App bundle name parsed from sdef path (e.g.,
/Applications/Mail.app/... → "Mail")
- Dictionary
title attribute (current behavior, as fallback only)
Impact
The name propagates through the full pipeline:
discovery-bundle.json → source.name
adapter-schema.json → name field
- Generated package →
package.json name
- MCP server →
serverInfo.name
- Introspection →
_protocol.adapter
A bad name at stage 1 pollutes every downstream artifact.
References
Summary
The sdef interrogator uses the
<dictionary title="...">attribute as the application name in the discovery bundle. This produces awkward names like "Mail Terminology" instead of "Mail", which then propagate through the entire pipeline to the generated package name (@mcpaql/generated-Mail Terminology-adapter).Root Cause
In
src/sdef-parser.ts,parseSdefFileextracts thetitleattribute from the root<dictionary>element and stores it asapplication. The sdef CLI then uses this assource.namein the discovery bundle.Apple's sdef files use descriptive dictionary titles:
"Mail Terminology""Foo Scripting","Bar Suite", etc.Expected Behavior
The interrogator should prefer the app name derived from the
--appflag or the bundle path, falling back to the dictionary title only if neither is available.Priority order:
--appCLI argument (e.g., "Mail")/Applications/Mail.app/...→ "Mail")titleattribute (current behavior, as fallback only)Impact
The name propagates through the full pipeline:
discovery-bundle.json→source.nameadapter-schema.json→namefieldpackage.jsonnameserverInfo.name_protocol.adapterA bad name at stage 1 pollutes every downstream artifact.
References
<dictionary title="Mail Terminology">at/System/Applications/Mail.app/Contents/Resources/Mail.sdef