@zavudev/sdk-mcp 0.15.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -228
- package/code-tool.d.mts +2 -44
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +2 -44
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +2 -2
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +2 -2
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +3 -3
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +3 -3
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +1 -1
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +1 -18
- package/http.js.map +1 -1
- package/http.mjs +1 -18
- package/http.mjs.map +1 -1
- package/index.js +4 -40
- package/index.js.map +1 -1
- package/index.mjs +4 -40
- package/index.mjs.map +1 -1
- package/options.d.mts +0 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +0 -9
- package/options.d.ts.map +1 -1
- package/options.js +4 -359
- package/options.js.map +1 -1
- package/options.mjs +4 -359
- package/options.mjs.map +1 -1
- package/package.json +9 -49
- package/server.d.mts +3 -8
- package/server.d.mts.map +1 -1
- package/server.d.ts +3 -8
- package/server.d.ts.map +1 -1
- package/server.js +12 -65
- package/server.js.map +1 -1
- package/server.mjs +11 -62
- package/server.mjs.map +1 -1
- package/src/code-tool.ts +2 -2
- package/src/docs-search-tool.ts +1 -1
- package/src/http.ts +1 -19
- package/src/index.ts +5 -52
- package/src/options.ts +5 -386
- package/src/server.ts +12 -72
- package/src/stdio.ts +2 -3
- package/src/{tools/types.ts → types.ts} +1 -1
- package/stdio.d.mts +1 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -2
- package/stdio.d.ts.map +1 -1
- package/stdio.js +2 -2
- package/stdio.js.map +1 -1
- package/stdio.mjs +2 -2
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +1 -1
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +1 -1
- package/types.d.ts.map +1 -0
- package/types.js.map +1 -0
- package/types.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -3
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -3
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -24
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -16
- package/filtering.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -153
- package/src/filtering.ts +0 -18
- package/src/tools/broadcasts/cancel-broadcasts.ts +0 -52
- package/src/tools/broadcasts/contacts/add-broadcasts-contacts.ts +0 -73
- package/src/tools/broadcasts/contacts/list-broadcasts-contacts.ts +0 -71
- package/src/tools/broadcasts/contacts/remove-broadcasts-contacts.ts +0 -43
- package/src/tools/broadcasts/create-broadcasts.ts +0 -134
- package/src/tools/broadcasts/delete-broadcasts.ts +0 -40
- package/src/tools/broadcasts/list-broadcasts.ts +0 -68
- package/src/tools/broadcasts/progress-broadcasts.ts +0 -54
- package/src/tools/broadcasts/retrieve-broadcasts.ts +0 -54
- package/src/tools/broadcasts/send-broadcasts.ts +0 -57
- package/src/tools/broadcasts/update-broadcasts.ts +0 -106
- package/src/tools/contacts/list-contacts.ts +0 -61
- package/src/tools/contacts/retrieve-by-phone-contacts.ts +0 -56
- package/src/tools/contacts/retrieve-contacts.ts +0 -54
- package/src/tools/contacts/update-contacts.ts +0 -61
- package/src/tools/index.ts +0 -149
- package/src/tools/introspect/validate-phone-introspect.ts +0 -52
- package/src/tools/messages/list-messages.ts +0 -78
- package/src/tools/messages/react-messages.ts +0 -59
- package/src/tools/messages/retrieve-messages.ts +0 -54
- package/src/tools/messages/send-messages.ts +0 -233
- package/src/tools/phone-numbers/list-phone-numbers.ts +0 -68
- package/src/tools/phone-numbers/purchase-phone-numbers.ts +0 -57
- package/src/tools/phone-numbers/release-phone-numbers.ts +0 -40
- package/src/tools/phone-numbers/retrieve-phone-numbers.ts +0 -56
- package/src/tools/phone-numbers/search-available-phone-numbers.ts +0 -72
- package/src/tools/phone-numbers/update-phone-numbers.ts +0 -62
- package/src/tools/senders/create-senders.ts +0 -86
- package/src/tools/senders/delete-senders.ts +0 -40
- package/src/tools/senders/get-profile-senders.ts +0 -54
- package/src/tools/senders/list-senders.ts +0 -58
- package/src/tools/senders/regenerate-webhook-secret-senders.ts +0 -54
- package/src/tools/senders/retrieve-senders.ts +0 -54
- package/src/tools/senders/update-profile-senders.ts +0 -107
- package/src/tools/senders/update-senders.ts +0 -90
- package/src/tools/senders/upload-profile-picture-senders.ts +0 -63
- package/src/tools/templates/create-templates.ts +0 -74
- package/src/tools/templates/delete-templates.ts +0 -40
- package/src/tools/templates/list-templates.ts +0 -58
- package/src/tools/templates/retrieve-templates.ts +0 -54
- package/src/tools/templates/submit-templates.ts +0 -66
- package/src/tools.ts +0 -1
- package/tools/broadcasts/cancel-broadcasts.d.mts +0 -51
- package/tools/broadcasts/cancel-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/cancel-broadcasts.d.ts +0 -51
- package/tools/broadcasts/cancel-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/cancel-broadcasts.js +0 -52
- package/tools/broadcasts/cancel-broadcasts.js.map +0 -1
- package/tools/broadcasts/cancel-broadcasts.mjs +0 -45
- package/tools/broadcasts/cancel-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts +0 -51
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.mts.map +0 -1
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts +0 -51
- package/tools/broadcasts/contacts/add-broadcasts-contacts.d.ts.map +0 -1
- package/tools/broadcasts/contacts/add-broadcasts-contacts.js +0 -71
- package/tools/broadcasts/contacts/add-broadcasts-contacts.js.map +0 -1
- package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs +0 -64
- package/tools/broadcasts/contacts/add-broadcasts-contacts.mjs.map +0 -1
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts +0 -51
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.mts.map +0 -1
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts +0 -51
- package/tools/broadcasts/contacts/list-broadcasts-contacts.d.ts.map +0 -1
- package/tools/broadcasts/contacts/list-broadcasts-contacts.js +0 -71
- package/tools/broadcasts/contacts/list-broadcasts-contacts.js.map +0 -1
- package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs +0 -64
- package/tools/broadcasts/contacts/list-broadcasts-contacts.mjs.map +0 -1
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts +0 -51
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.mts.map +0 -1
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts +0 -51
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.d.ts.map +0 -1
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.js +0 -40
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.js.map +0 -1
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs +0 -36
- package/tools/broadcasts/contacts/remove-broadcasts-contacts.mjs.map +0 -1
- package/tools/broadcasts/create-broadcasts.d.mts +0 -51
- package/tools/broadcasts/create-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/create-broadcasts.d.ts +0 -51
- package/tools/broadcasts/create-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/create-broadcasts.js +0 -134
- package/tools/broadcasts/create-broadcasts.js.map +0 -1
- package/tools/broadcasts/create-broadcasts.mjs +0 -127
- package/tools/broadcasts/create-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/delete-broadcasts.d.mts +0 -51
- package/tools/broadcasts/delete-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/delete-broadcasts.d.ts +0 -51
- package/tools/broadcasts/delete-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/delete-broadcasts.js +0 -37
- package/tools/broadcasts/delete-broadcasts.js.map +0 -1
- package/tools/broadcasts/delete-broadcasts.mjs +0 -33
- package/tools/broadcasts/delete-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/list-broadcasts.d.mts +0 -51
- package/tools/broadcasts/list-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/list-broadcasts.d.ts +0 -51
- package/tools/broadcasts/list-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/list-broadcasts.js +0 -68
- package/tools/broadcasts/list-broadcasts.js.map +0 -1
- package/tools/broadcasts/list-broadcasts.mjs +0 -61
- package/tools/broadcasts/list-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/progress-broadcasts.d.mts +0 -51
- package/tools/broadcasts/progress-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/progress-broadcasts.d.ts +0 -51
- package/tools/broadcasts/progress-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/progress-broadcasts.js +0 -54
- package/tools/broadcasts/progress-broadcasts.js.map +0 -1
- package/tools/broadcasts/progress-broadcasts.mjs +0 -47
- package/tools/broadcasts/progress-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/retrieve-broadcasts.d.mts +0 -51
- package/tools/broadcasts/retrieve-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/retrieve-broadcasts.d.ts +0 -51
- package/tools/broadcasts/retrieve-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/retrieve-broadcasts.js +0 -54
- package/tools/broadcasts/retrieve-broadcasts.js.map +0 -1
- package/tools/broadcasts/retrieve-broadcasts.mjs +0 -47
- package/tools/broadcasts/retrieve-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/send-broadcasts.d.mts +0 -51
- package/tools/broadcasts/send-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/send-broadcasts.d.ts +0 -51
- package/tools/broadcasts/send-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/send-broadcasts.js +0 -57
- package/tools/broadcasts/send-broadcasts.js.map +0 -1
- package/tools/broadcasts/send-broadcasts.mjs +0 -50
- package/tools/broadcasts/send-broadcasts.mjs.map +0 -1
- package/tools/broadcasts/update-broadcasts.d.mts +0 -51
- package/tools/broadcasts/update-broadcasts.d.mts.map +0 -1
- package/tools/broadcasts/update-broadcasts.d.ts +0 -51
- package/tools/broadcasts/update-broadcasts.d.ts.map +0 -1
- package/tools/broadcasts/update-broadcasts.js +0 -104
- package/tools/broadcasts/update-broadcasts.js.map +0 -1
- package/tools/broadcasts/update-broadcasts.mjs +0 -97
- package/tools/broadcasts/update-broadcasts.mjs.map +0 -1
- package/tools/contacts/list-contacts.d.mts +0 -51
- package/tools/contacts/list-contacts.d.mts.map +0 -1
- package/tools/contacts/list-contacts.d.ts +0 -51
- package/tools/contacts/list-contacts.d.ts.map +0 -1
- package/tools/contacts/list-contacts.js +0 -61
- package/tools/contacts/list-contacts.js.map +0 -1
- package/tools/contacts/list-contacts.mjs +0 -54
- package/tools/contacts/list-contacts.mjs.map +0 -1
- package/tools/contacts/retrieve-by-phone-contacts.d.mts +0 -51
- package/tools/contacts/retrieve-by-phone-contacts.d.mts.map +0 -1
- package/tools/contacts/retrieve-by-phone-contacts.d.ts +0 -51
- package/tools/contacts/retrieve-by-phone-contacts.d.ts.map +0 -1
- package/tools/contacts/retrieve-by-phone-contacts.js +0 -54
- package/tools/contacts/retrieve-by-phone-contacts.js.map +0 -1
- package/tools/contacts/retrieve-by-phone-contacts.mjs +0 -47
- package/tools/contacts/retrieve-by-phone-contacts.mjs.map +0 -1
- package/tools/contacts/retrieve-contacts.d.mts +0 -51
- package/tools/contacts/retrieve-contacts.d.mts.map +0 -1
- package/tools/contacts/retrieve-contacts.d.ts +0 -51
- package/tools/contacts/retrieve-contacts.d.ts.map +0 -1
- package/tools/contacts/retrieve-contacts.js +0 -54
- package/tools/contacts/retrieve-contacts.js.map +0 -1
- package/tools/contacts/retrieve-contacts.mjs +0 -47
- package/tools/contacts/retrieve-contacts.mjs.map +0 -1
- package/tools/contacts/update-contacts.d.mts +0 -51
- package/tools/contacts/update-contacts.d.mts.map +0 -1
- package/tools/contacts/update-contacts.d.ts +0 -51
- package/tools/contacts/update-contacts.d.ts.map +0 -1
- package/tools/contacts/update-contacts.js +0 -61
- package/tools/contacts/update-contacts.js.map +0 -1
- package/tools/contacts/update-contacts.mjs +0 -54
- package/tools/contacts/update-contacts.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -133
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -126
- package/tools/index.mjs.map +0 -1
- package/tools/introspect/validate-phone-introspect.d.mts +0 -51
- package/tools/introspect/validate-phone-introspect.d.mts.map +0 -1
- package/tools/introspect/validate-phone-introspect.d.ts +0 -51
- package/tools/introspect/validate-phone-introspect.d.ts.map +0 -1
- package/tools/introspect/validate-phone-introspect.js +0 -52
- package/tools/introspect/validate-phone-introspect.js.map +0 -1
- package/tools/introspect/validate-phone-introspect.mjs +0 -45
- package/tools/introspect/validate-phone-introspect.mjs.map +0 -1
- package/tools/messages/list-messages.d.mts +0 -51
- package/tools/messages/list-messages.d.mts.map +0 -1
- package/tools/messages/list-messages.d.ts +0 -51
- package/tools/messages/list-messages.d.ts.map +0 -1
- package/tools/messages/list-messages.js +0 -78
- package/tools/messages/list-messages.js.map +0 -1
- package/tools/messages/list-messages.mjs +0 -71
- package/tools/messages/list-messages.mjs.map +0 -1
- package/tools/messages/react-messages.d.mts +0 -51
- package/tools/messages/react-messages.d.mts.map +0 -1
- package/tools/messages/react-messages.d.ts +0 -51
- package/tools/messages/react-messages.d.ts.map +0 -1
- package/tools/messages/react-messages.js +0 -59
- package/tools/messages/react-messages.js.map +0 -1
- package/tools/messages/react-messages.mjs +0 -52
- package/tools/messages/react-messages.mjs.map +0 -1
- package/tools/messages/retrieve-messages.d.mts +0 -51
- package/tools/messages/retrieve-messages.d.mts.map +0 -1
- package/tools/messages/retrieve-messages.d.ts +0 -51
- package/tools/messages/retrieve-messages.d.ts.map +0 -1
- package/tools/messages/retrieve-messages.js +0 -54
- package/tools/messages/retrieve-messages.js.map +0 -1
- package/tools/messages/retrieve-messages.mjs +0 -47
- package/tools/messages/retrieve-messages.mjs.map +0 -1
- package/tools/messages/send-messages.d.mts +0 -51
- package/tools/messages/send-messages.d.mts.map +0 -1
- package/tools/messages/send-messages.d.ts +0 -51
- package/tools/messages/send-messages.d.ts.map +0 -1
- package/tools/messages/send-messages.js +0 -233
- package/tools/messages/send-messages.js.map +0 -1
- package/tools/messages/send-messages.mjs +0 -226
- package/tools/messages/send-messages.mjs.map +0 -1
- package/tools/phone-numbers/list-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/list-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/list-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/list-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/list-phone-numbers.js +0 -68
- package/tools/phone-numbers/list-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/list-phone-numbers.mjs +0 -61
- package/tools/phone-numbers/list-phone-numbers.mjs.map +0 -1
- package/tools/phone-numbers/purchase-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/purchase-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/purchase-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/purchase-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/purchase-phone-numbers.js +0 -57
- package/tools/phone-numbers/purchase-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/purchase-phone-numbers.mjs +0 -50
- package/tools/phone-numbers/purchase-phone-numbers.mjs.map +0 -1
- package/tools/phone-numbers/release-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/release-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/release-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/release-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/release-phone-numbers.js +0 -37
- package/tools/phone-numbers/release-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/release-phone-numbers.mjs +0 -33
- package/tools/phone-numbers/release-phone-numbers.mjs.map +0 -1
- package/tools/phone-numbers/retrieve-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/retrieve-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/retrieve-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/retrieve-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/retrieve-phone-numbers.js +0 -54
- package/tools/phone-numbers/retrieve-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/retrieve-phone-numbers.mjs +0 -47
- package/tools/phone-numbers/retrieve-phone-numbers.mjs.map +0 -1
- package/tools/phone-numbers/search-available-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/search-available-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/search-available-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/search-available-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/search-available-phone-numbers.js +0 -72
- package/tools/phone-numbers/search-available-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/search-available-phone-numbers.mjs +0 -65
- package/tools/phone-numbers/search-available-phone-numbers.mjs.map +0 -1
- package/tools/phone-numbers/update-phone-numbers.d.mts +0 -51
- package/tools/phone-numbers/update-phone-numbers.d.mts.map +0 -1
- package/tools/phone-numbers/update-phone-numbers.d.ts +0 -51
- package/tools/phone-numbers/update-phone-numbers.d.ts.map +0 -1
- package/tools/phone-numbers/update-phone-numbers.js +0 -60
- package/tools/phone-numbers/update-phone-numbers.js.map +0 -1
- package/tools/phone-numbers/update-phone-numbers.mjs +0 -53
- package/tools/phone-numbers/update-phone-numbers.mjs.map +0 -1
- package/tools/senders/create-senders.d.mts +0 -51
- package/tools/senders/create-senders.d.mts.map +0 -1
- package/tools/senders/create-senders.d.ts +0 -51
- package/tools/senders/create-senders.d.ts.map +0 -1
- package/tools/senders/create-senders.js +0 -85
- package/tools/senders/create-senders.js.map +0 -1
- package/tools/senders/create-senders.mjs +0 -78
- package/tools/senders/create-senders.mjs.map +0 -1
- package/tools/senders/delete-senders.d.mts +0 -51
- package/tools/senders/delete-senders.d.mts.map +0 -1
- package/tools/senders/delete-senders.d.ts +0 -51
- package/tools/senders/delete-senders.d.ts.map +0 -1
- package/tools/senders/delete-senders.js +0 -37
- package/tools/senders/delete-senders.js.map +0 -1
- package/tools/senders/delete-senders.mjs +0 -33
- package/tools/senders/delete-senders.mjs.map +0 -1
- package/tools/senders/get-profile-senders.d.mts +0 -51
- package/tools/senders/get-profile-senders.d.mts.map +0 -1
- package/tools/senders/get-profile-senders.d.ts +0 -51
- package/tools/senders/get-profile-senders.d.ts.map +0 -1
- package/tools/senders/get-profile-senders.js +0 -54
- package/tools/senders/get-profile-senders.js.map +0 -1
- package/tools/senders/get-profile-senders.mjs +0 -47
- package/tools/senders/get-profile-senders.mjs.map +0 -1
- package/tools/senders/list-senders.d.mts +0 -51
- package/tools/senders/list-senders.d.mts.map +0 -1
- package/tools/senders/list-senders.d.ts +0 -51
- package/tools/senders/list-senders.d.ts.map +0 -1
- package/tools/senders/list-senders.js +0 -58
- package/tools/senders/list-senders.js.map +0 -1
- package/tools/senders/list-senders.mjs +0 -51
- package/tools/senders/list-senders.mjs.map +0 -1
- package/tools/senders/regenerate-webhook-secret-senders.d.mts +0 -51
- package/tools/senders/regenerate-webhook-secret-senders.d.mts.map +0 -1
- package/tools/senders/regenerate-webhook-secret-senders.d.ts +0 -51
- package/tools/senders/regenerate-webhook-secret-senders.d.ts.map +0 -1
- package/tools/senders/regenerate-webhook-secret-senders.js +0 -52
- package/tools/senders/regenerate-webhook-secret-senders.js.map +0 -1
- package/tools/senders/regenerate-webhook-secret-senders.mjs +0 -45
- package/tools/senders/regenerate-webhook-secret-senders.mjs.map +0 -1
- package/tools/senders/retrieve-senders.d.mts +0 -51
- package/tools/senders/retrieve-senders.d.mts.map +0 -1
- package/tools/senders/retrieve-senders.d.ts +0 -51
- package/tools/senders/retrieve-senders.d.ts.map +0 -1
- package/tools/senders/retrieve-senders.js +0 -54
- package/tools/senders/retrieve-senders.js.map +0 -1
- package/tools/senders/retrieve-senders.mjs +0 -47
- package/tools/senders/retrieve-senders.mjs.map +0 -1
- package/tools/senders/update-profile-senders.d.mts +0 -51
- package/tools/senders/update-profile-senders.d.mts.map +0 -1
- package/tools/senders/update-profile-senders.d.ts +0 -51
- package/tools/senders/update-profile-senders.d.ts.map +0 -1
- package/tools/senders/update-profile-senders.js +0 -105
- package/tools/senders/update-profile-senders.js.map +0 -1
- package/tools/senders/update-profile-senders.mjs +0 -98
- package/tools/senders/update-profile-senders.mjs.map +0 -1
- package/tools/senders/update-senders.d.mts +0 -51
- package/tools/senders/update-senders.d.mts.map +0 -1
- package/tools/senders/update-senders.d.ts +0 -51
- package/tools/senders/update-senders.d.ts.map +0 -1
- package/tools/senders/update-senders.js +0 -89
- package/tools/senders/update-senders.js.map +0 -1
- package/tools/senders/update-senders.mjs +0 -82
- package/tools/senders/update-senders.mjs.map +0 -1
- package/tools/senders/upload-profile-picture-senders.d.mts +0 -51
- package/tools/senders/upload-profile-picture-senders.d.mts.map +0 -1
- package/tools/senders/upload-profile-picture-senders.d.ts +0 -51
- package/tools/senders/upload-profile-picture-senders.d.ts.map +0 -1
- package/tools/senders/upload-profile-picture-senders.js +0 -61
- package/tools/senders/upload-profile-picture-senders.js.map +0 -1
- package/tools/senders/upload-profile-picture-senders.mjs +0 -54
- package/tools/senders/upload-profile-picture-senders.mjs.map +0 -1
- package/tools/templates/create-templates.d.mts +0 -51
- package/tools/templates/create-templates.d.mts.map +0 -1
- package/tools/templates/create-templates.d.ts +0 -51
- package/tools/templates/create-templates.d.ts.map +0 -1
- package/tools/templates/create-templates.js +0 -74
- package/tools/templates/create-templates.js.map +0 -1
- package/tools/templates/create-templates.mjs +0 -67
- package/tools/templates/create-templates.mjs.map +0 -1
- package/tools/templates/delete-templates.d.mts +0 -51
- package/tools/templates/delete-templates.d.mts.map +0 -1
- package/tools/templates/delete-templates.d.ts +0 -51
- package/tools/templates/delete-templates.d.ts.map +0 -1
- package/tools/templates/delete-templates.js +0 -37
- package/tools/templates/delete-templates.js.map +0 -1
- package/tools/templates/delete-templates.mjs +0 -33
- package/tools/templates/delete-templates.mjs.map +0 -1
- package/tools/templates/list-templates.d.mts +0 -51
- package/tools/templates/list-templates.d.mts.map +0 -1
- package/tools/templates/list-templates.d.ts +0 -51
- package/tools/templates/list-templates.d.ts.map +0 -1
- package/tools/templates/list-templates.js +0 -58
- package/tools/templates/list-templates.js.map +0 -1
- package/tools/templates/list-templates.mjs +0 -51
- package/tools/templates/list-templates.mjs.map +0 -1
- package/tools/templates/retrieve-templates.d.mts +0 -51
- package/tools/templates/retrieve-templates.d.mts.map +0 -1
- package/tools/templates/retrieve-templates.d.ts +0 -51
- package/tools/templates/retrieve-templates.d.ts.map +0 -1
- package/tools/templates/retrieve-templates.js +0 -54
- package/tools/templates/retrieve-templates.js.map +0 -1
- package/tools/templates/retrieve-templates.mjs +0 -47
- package/tools/templates/retrieve-templates.mjs.map +0 -1
- package/tools/templates/submit-templates.d.mts +0 -51
- package/tools/templates/submit-templates.d.mts.map +0 -1
- package/tools/templates/submit-templates.d.ts +0 -51
- package/tools/templates/submit-templates.d.ts.map +0 -1
- package/tools/templates/submit-templates.js +0 -66
- package/tools/templates/submit-templates.js.map +0 -1
- package/tools/templates/submit-templates.mjs +0 -59
- package/tools/templates/submit-templates.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
- /package/{tools/types.js → types.js} +0 -0
- /package/{tools/types.mjs → types.mjs} +0 -0
package/src/options.ts
CHANGED
|
@@ -2,140 +2,31 @@ import qs from 'qs';
|
|
|
2
2
|
import yargs from 'yargs';
|
|
3
3
|
import { hideBin } from 'yargs/helpers';
|
|
4
4
|
import z from 'zod';
|
|
5
|
-
import { endpoints, Filter } from './tools';
|
|
6
|
-
import { ClientCapabilities, knownClients, ClientType } from './compat';
|
|
7
5
|
|
|
8
6
|
export type CLIOptions = McpOptions & {
|
|
9
|
-
list: boolean;
|
|
10
7
|
transport: 'stdio' | 'http';
|
|
11
8
|
port: number | undefined;
|
|
12
9
|
socket: string | undefined;
|
|
13
10
|
};
|
|
14
11
|
|
|
15
12
|
export type McpOptions = {
|
|
16
|
-
client?: ClientType | undefined;
|
|
17
|
-
includeDynamicTools?: boolean | undefined;
|
|
18
|
-
includeAllTools?: boolean | undefined;
|
|
19
|
-
includeCodeTools?: boolean | undefined;
|
|
20
13
|
includeDocsTools?: boolean | undefined;
|
|
21
|
-
filters?: Filter[] | undefined;
|
|
22
|
-
capabilities?: Partial<ClientCapabilities> | undefined;
|
|
23
14
|
};
|
|
24
15
|
|
|
25
|
-
const CAPABILITY_CHOICES = [
|
|
26
|
-
'top-level-unions',
|
|
27
|
-
'valid-json',
|
|
28
|
-
'refs',
|
|
29
|
-
'unions',
|
|
30
|
-
'formats',
|
|
31
|
-
'tool-name-length',
|
|
32
|
-
] as const;
|
|
33
|
-
|
|
34
|
-
type Capability = (typeof CAPABILITY_CHOICES)[number];
|
|
35
|
-
|
|
36
|
-
function parseCapabilityValue(cap: string): { name: Capability; value?: number } {
|
|
37
|
-
if (cap.startsWith('tool-name-length=')) {
|
|
38
|
-
const parts = cap.split('=');
|
|
39
|
-
if (parts.length === 2) {
|
|
40
|
-
const length = parseInt(parts[1]!, 10);
|
|
41
|
-
if (!isNaN(length)) {
|
|
42
|
-
return { name: 'tool-name-length', value: length };
|
|
43
|
-
}
|
|
44
|
-
throw new Error(`Invalid tool-name-length value: ${parts[1]}. Expected a number.`);
|
|
45
|
-
}
|
|
46
|
-
throw new Error(`Invalid format for tool-name-length. Expected tool-name-length=N.`);
|
|
47
|
-
}
|
|
48
|
-
if (!CAPABILITY_CHOICES.includes(cap as Capability)) {
|
|
49
|
-
throw new Error(`Unknown capability: ${cap}. Valid capabilities are: ${CAPABILITY_CHOICES.join(', ')}`);
|
|
50
|
-
}
|
|
51
|
-
return { name: cap as Capability };
|
|
52
|
-
}
|
|
53
|
-
|
|
54
16
|
export function parseCLIOptions(): CLIOptions {
|
|
55
17
|
const opts = yargs(hideBin(process.argv))
|
|
56
18
|
.option('tools', {
|
|
57
19
|
type: 'string',
|
|
58
20
|
array: true,
|
|
59
|
-
choices: ['
|
|
21
|
+
choices: ['code', 'docs'],
|
|
60
22
|
description: 'Use dynamic tools or all tools',
|
|
61
23
|
})
|
|
62
24
|
.option('no-tools', {
|
|
63
25
|
type: 'string',
|
|
64
26
|
array: true,
|
|
65
|
-
choices: ['
|
|
27
|
+
choices: ['code', 'docs'],
|
|
66
28
|
description: 'Do not use any dynamic or all tools',
|
|
67
29
|
})
|
|
68
|
-
.option('tool', {
|
|
69
|
-
type: 'string',
|
|
70
|
-
array: true,
|
|
71
|
-
description: 'Include tools matching the specified names',
|
|
72
|
-
})
|
|
73
|
-
.option('resource', {
|
|
74
|
-
type: 'string',
|
|
75
|
-
array: true,
|
|
76
|
-
description: 'Include tools matching the specified resources',
|
|
77
|
-
})
|
|
78
|
-
.option('operation', {
|
|
79
|
-
type: 'string',
|
|
80
|
-
array: true,
|
|
81
|
-
choices: ['read', 'write'],
|
|
82
|
-
description: 'Include tools matching the specified operations',
|
|
83
|
-
})
|
|
84
|
-
.option('tag', {
|
|
85
|
-
type: 'string',
|
|
86
|
-
array: true,
|
|
87
|
-
description: 'Include tools with the specified tags',
|
|
88
|
-
})
|
|
89
|
-
.option('no-tool', {
|
|
90
|
-
type: 'string',
|
|
91
|
-
array: true,
|
|
92
|
-
description: 'Exclude tools matching the specified names',
|
|
93
|
-
})
|
|
94
|
-
.option('no-resource', {
|
|
95
|
-
type: 'string',
|
|
96
|
-
array: true,
|
|
97
|
-
description: 'Exclude tools matching the specified resources',
|
|
98
|
-
})
|
|
99
|
-
.option('no-operation', {
|
|
100
|
-
type: 'string',
|
|
101
|
-
array: true,
|
|
102
|
-
description: 'Exclude tools matching the specified operations',
|
|
103
|
-
})
|
|
104
|
-
.option('no-tag', {
|
|
105
|
-
type: 'string',
|
|
106
|
-
array: true,
|
|
107
|
-
description: 'Exclude tools with the specified tags',
|
|
108
|
-
})
|
|
109
|
-
.option('list', {
|
|
110
|
-
type: 'boolean',
|
|
111
|
-
description: 'List all tools and exit',
|
|
112
|
-
})
|
|
113
|
-
.option('client', {
|
|
114
|
-
type: 'string',
|
|
115
|
-
choices: Object.keys(knownClients),
|
|
116
|
-
description: 'Specify the MCP client being used',
|
|
117
|
-
})
|
|
118
|
-
.option('capability', {
|
|
119
|
-
type: 'string',
|
|
120
|
-
array: true,
|
|
121
|
-
description: 'Specify client capabilities',
|
|
122
|
-
coerce: (values: string[]) => {
|
|
123
|
-
return values.flatMap((v) => v.split(','));
|
|
124
|
-
},
|
|
125
|
-
})
|
|
126
|
-
.option('no-capability', {
|
|
127
|
-
type: 'string',
|
|
128
|
-
array: true,
|
|
129
|
-
description: 'Unset client capabilities',
|
|
130
|
-
choices: CAPABILITY_CHOICES,
|
|
131
|
-
coerce: (values: string[]) => {
|
|
132
|
-
return values.flatMap((v) => v.split(','));
|
|
133
|
-
},
|
|
134
|
-
})
|
|
135
|
-
.option('describe-capabilities', {
|
|
136
|
-
type: 'boolean',
|
|
137
|
-
description: 'Print detailed explanation of client capabilities and exit',
|
|
138
|
-
})
|
|
139
30
|
.option('transport', {
|
|
140
31
|
type: 'string',
|
|
141
32
|
choices: ['stdio', 'http'],
|
|
@@ -152,122 +43,19 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
152
43
|
})
|
|
153
44
|
.help();
|
|
154
45
|
|
|
155
|
-
for (const [command, desc] of examples()) {
|
|
156
|
-
opts.example(command, desc);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
46
|
const argv = opts.parseSync();
|
|
160
47
|
|
|
161
|
-
|
|
162
|
-
if (argv.describeCapabilities) {
|
|
163
|
-
console.log(getCapabilitiesExplanation());
|
|
164
|
-
process.exit(0);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const filters: Filter[] = [];
|
|
168
|
-
|
|
169
|
-
// Helper function to support comma-separated values
|
|
170
|
-
const splitValues = (values: string[] | undefined): string[] => {
|
|
171
|
-
if (!values) return [];
|
|
172
|
-
return values.flatMap((v) => v.split(','));
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
for (const tag of splitValues(argv.tag)) {
|
|
176
|
-
filters.push({ type: 'tag', op: 'include', value: tag });
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
for (const tag of splitValues(argv.noTag)) {
|
|
180
|
-
filters.push({ type: 'tag', op: 'exclude', value: tag });
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
for (const resource of splitValues(argv.resource)) {
|
|
184
|
-
filters.push({ type: 'resource', op: 'include', value: resource });
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
for (const resource of splitValues(argv.noResource)) {
|
|
188
|
-
filters.push({ type: 'resource', op: 'exclude', value: resource });
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
for (const tool of splitValues(argv.tool)) {
|
|
192
|
-
filters.push({ type: 'tool', op: 'include', value: tool });
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
for (const tool of splitValues(argv.noTool)) {
|
|
196
|
-
filters.push({ type: 'tool', op: 'exclude', value: tool });
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
for (const operation of splitValues(argv.operation)) {
|
|
200
|
-
filters.push({ type: 'operation', op: 'include', value: operation });
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
for (const operation of splitValues(argv.noOperation)) {
|
|
204
|
-
filters.push({ type: 'operation', op: 'exclude', value: operation });
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// Parse client capabilities
|
|
208
|
-
const clientCapabilities: Partial<ClientCapabilities> = {};
|
|
209
|
-
|
|
210
|
-
// Apply individual capability overrides
|
|
211
|
-
if (Array.isArray(argv.capability)) {
|
|
212
|
-
for (const cap of argv.capability) {
|
|
213
|
-
const parsedCap = parseCapabilityValue(cap);
|
|
214
|
-
if (parsedCap.name === 'top-level-unions') {
|
|
215
|
-
clientCapabilities.topLevelUnions = true;
|
|
216
|
-
} else if (parsedCap.name === 'valid-json') {
|
|
217
|
-
clientCapabilities.validJson = true;
|
|
218
|
-
} else if (parsedCap.name === 'refs') {
|
|
219
|
-
clientCapabilities.refs = true;
|
|
220
|
-
} else if (parsedCap.name === 'unions') {
|
|
221
|
-
clientCapabilities.unions = true;
|
|
222
|
-
} else if (parsedCap.name === 'formats') {
|
|
223
|
-
clientCapabilities.formats = true;
|
|
224
|
-
} else if (parsedCap.name === 'tool-name-length') {
|
|
225
|
-
clientCapabilities.toolNameLength = parsedCap.value;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Handle no-capability options to unset capabilities
|
|
231
|
-
if (Array.isArray(argv.noCapability)) {
|
|
232
|
-
for (const cap of argv.noCapability) {
|
|
233
|
-
if (cap === 'top-level-unions') {
|
|
234
|
-
clientCapabilities.topLevelUnions = false;
|
|
235
|
-
} else if (cap === 'valid-json') {
|
|
236
|
-
clientCapabilities.validJson = false;
|
|
237
|
-
} else if (cap === 'refs') {
|
|
238
|
-
clientCapabilities.refs = false;
|
|
239
|
-
} else if (cap === 'unions') {
|
|
240
|
-
clientCapabilities.unions = false;
|
|
241
|
-
} else if (cap === 'formats') {
|
|
242
|
-
clientCapabilities.formats = false;
|
|
243
|
-
} else if (cap === 'tool-name-length') {
|
|
244
|
-
clientCapabilities.toolNameLength = undefined;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code' | 'docs') =>
|
|
48
|
+
const shouldIncludeToolType = (toolType: 'code' | 'docs') =>
|
|
250
49
|
argv.noTools?.includes(toolType) ? false
|
|
251
50
|
: argv.tools?.includes(toolType) ? true
|
|
252
51
|
: undefined;
|
|
253
52
|
|
|
254
|
-
const includeDynamicTools = shouldIncludeToolType('dynamic');
|
|
255
|
-
const includeAllTools = shouldIncludeToolType('all');
|
|
256
|
-
const includeCodeTools = shouldIncludeToolType('code');
|
|
257
53
|
const includeDocsTools = shouldIncludeToolType('docs');
|
|
258
54
|
|
|
259
55
|
const transport = argv.transport as 'stdio' | 'http';
|
|
260
56
|
|
|
261
|
-
const client = argv.client as ClientType;
|
|
262
57
|
return {
|
|
263
|
-
client: client && client !== 'infer' && knownClients[client] ? client : undefined,
|
|
264
|
-
includeDynamicTools,
|
|
265
|
-
includeAllTools,
|
|
266
|
-
includeCodeTools,
|
|
267
58
|
includeDocsTools,
|
|
268
|
-
filters,
|
|
269
|
-
capabilities: clientCapabilities,
|
|
270
|
-
list: argv.list || false,
|
|
271
59
|
transport,
|
|
272
60
|
port: argv.port,
|
|
273
61
|
socket: argv.socket,
|
|
@@ -284,190 +72,21 @@ const coerceArray = <T extends z.ZodTypeAny>(zodType: T) =>
|
|
|
284
72
|
);
|
|
285
73
|
|
|
286
74
|
const QueryOptions = z.object({
|
|
287
|
-
tools: coerceArray(z.enum(['
|
|
288
|
-
no_tools: coerceArray(z.enum(['
|
|
289
|
-
'Specify which MCP tools to not use.',
|
|
290
|
-
),
|
|
75
|
+
tools: coerceArray(z.enum(['code', 'docs'])).describe('Specify which MCP tools to use'),
|
|
76
|
+
no_tools: coerceArray(z.enum(['code', 'docs'])).describe('Specify which MCP tools to not use.'),
|
|
291
77
|
tool: coerceArray(z.string()).describe('Include tools matching the specified names'),
|
|
292
|
-
resource: coerceArray(z.string()).describe('Include tools matching the specified resources'),
|
|
293
|
-
operation: coerceArray(z.enum(['read', 'write'])).describe(
|
|
294
|
-
'Include tools matching the specified operations',
|
|
295
|
-
),
|
|
296
|
-
tag: coerceArray(z.string()).describe('Include tools with the specified tags'),
|
|
297
|
-
no_tool: coerceArray(z.string()).describe('Exclude tools matching the specified names'),
|
|
298
|
-
no_resource: coerceArray(z.string()).describe('Exclude tools matching the specified resources'),
|
|
299
|
-
no_operation: coerceArray(z.enum(['read', 'write'])).describe(
|
|
300
|
-
'Exclude tools matching the specified operations',
|
|
301
|
-
),
|
|
302
|
-
no_tag: coerceArray(z.string()).describe('Exclude tools with the specified tags'),
|
|
303
|
-
client: ClientType.optional().describe('Specify the MCP client being used'),
|
|
304
|
-
capability: coerceArray(z.string()).describe('Specify client capabilities'),
|
|
305
|
-
no_capability: coerceArray(z.enum(CAPABILITY_CHOICES)).describe('Unset client capabilities'),
|
|
306
78
|
});
|
|
307
79
|
|
|
308
80
|
export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): McpOptions {
|
|
309
81
|
const queryObject = typeof query === 'string' ? qs.parse(query) : query;
|
|
310
82
|
const queryOptions = QueryOptions.parse(queryObject);
|
|
311
83
|
|
|
312
|
-
const filters: Filter[] = [...(defaultOptions.filters ?? [])];
|
|
313
|
-
|
|
314
|
-
for (const resource of queryOptions.resource || []) {
|
|
315
|
-
filters.push({ type: 'resource', op: 'include', value: resource });
|
|
316
|
-
}
|
|
317
|
-
for (const operation of queryOptions.operation || []) {
|
|
318
|
-
filters.push({ type: 'operation', op: 'include', value: operation });
|
|
319
|
-
}
|
|
320
|
-
for (const tag of queryOptions.tag || []) {
|
|
321
|
-
filters.push({ type: 'tag', op: 'include', value: tag });
|
|
322
|
-
}
|
|
323
|
-
for (const tool of queryOptions.tool || []) {
|
|
324
|
-
filters.push({ type: 'tool', op: 'include', value: tool });
|
|
325
|
-
}
|
|
326
|
-
for (const resource of queryOptions.no_resource || []) {
|
|
327
|
-
filters.push({ type: 'resource', op: 'exclude', value: resource });
|
|
328
|
-
}
|
|
329
|
-
for (const operation of queryOptions.no_operation || []) {
|
|
330
|
-
filters.push({ type: 'operation', op: 'exclude', value: operation });
|
|
331
|
-
}
|
|
332
|
-
for (const tag of queryOptions.no_tag || []) {
|
|
333
|
-
filters.push({ type: 'tag', op: 'exclude', value: tag });
|
|
334
|
-
}
|
|
335
|
-
for (const tool of queryOptions.no_tool || []) {
|
|
336
|
-
filters.push({ type: 'tool', op: 'exclude', value: tool });
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Parse client capabilities
|
|
340
|
-
const clientCapabilities: Partial<ClientCapabilities> = { ...defaultOptions.capabilities };
|
|
341
|
-
|
|
342
|
-
for (const cap of queryOptions.capability || []) {
|
|
343
|
-
const parsed = parseCapabilityValue(cap);
|
|
344
|
-
if (parsed.name === 'top-level-unions') {
|
|
345
|
-
clientCapabilities.topLevelUnions = true;
|
|
346
|
-
} else if (parsed.name === 'valid-json') {
|
|
347
|
-
clientCapabilities.validJson = true;
|
|
348
|
-
} else if (parsed.name === 'refs') {
|
|
349
|
-
clientCapabilities.refs = true;
|
|
350
|
-
} else if (parsed.name === 'unions') {
|
|
351
|
-
clientCapabilities.unions = true;
|
|
352
|
-
} else if (parsed.name === 'formats') {
|
|
353
|
-
clientCapabilities.formats = true;
|
|
354
|
-
} else if (parsed.name === 'tool-name-length') {
|
|
355
|
-
clientCapabilities.toolNameLength = parsed.value;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
for (const cap of queryOptions.no_capability || []) {
|
|
360
|
-
if (cap === 'top-level-unions') {
|
|
361
|
-
clientCapabilities.topLevelUnions = false;
|
|
362
|
-
} else if (cap === 'valid-json') {
|
|
363
|
-
clientCapabilities.validJson = false;
|
|
364
|
-
} else if (cap === 'refs') {
|
|
365
|
-
clientCapabilities.refs = false;
|
|
366
|
-
} else if (cap === 'unions') {
|
|
367
|
-
clientCapabilities.unions = false;
|
|
368
|
-
} else if (cap === 'formats') {
|
|
369
|
-
clientCapabilities.formats = false;
|
|
370
|
-
} else if (cap === 'tool-name-length') {
|
|
371
|
-
clientCapabilities.toolNameLength = undefined;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
let dynamicTools: boolean | undefined =
|
|
376
|
-
queryOptions.no_tools && queryOptions.no_tools?.includes('dynamic') ? false
|
|
377
|
-
: queryOptions.tools?.includes('dynamic') ? true
|
|
378
|
-
: defaultOptions.includeDynamicTools;
|
|
379
|
-
|
|
380
|
-
let allTools: boolean | undefined =
|
|
381
|
-
queryOptions.no_tools && queryOptions.no_tools?.includes('all') ? false
|
|
382
|
-
: queryOptions.tools?.includes('all') ? true
|
|
383
|
-
: defaultOptions.includeAllTools;
|
|
384
|
-
|
|
385
84
|
let docsTools: boolean | undefined =
|
|
386
85
|
queryOptions.no_tools && queryOptions.no_tools?.includes('docs') ? false
|
|
387
86
|
: queryOptions.tools?.includes('docs') ? true
|
|
388
87
|
: defaultOptions.includeDocsTools;
|
|
389
88
|
|
|
390
|
-
let codeTools: boolean | undefined =
|
|
391
|
-
queryOptions.no_tools && queryOptions.no_tools?.includes('code') ? false
|
|
392
|
-
: queryOptions.tools?.includes('code') && defaultOptions.includeCodeTools ? true
|
|
393
|
-
: defaultOptions.includeCodeTools;
|
|
394
|
-
|
|
395
89
|
return {
|
|
396
|
-
client: queryOptions.client ?? defaultOptions.client,
|
|
397
|
-
includeDynamicTools: dynamicTools,
|
|
398
|
-
includeAllTools: allTools,
|
|
399
|
-
includeCodeTools: codeTools,
|
|
400
90
|
includeDocsTools: docsTools,
|
|
401
|
-
filters,
|
|
402
|
-
capabilities: clientCapabilities,
|
|
403
91
|
};
|
|
404
92
|
}
|
|
405
|
-
|
|
406
|
-
function getCapabilitiesExplanation(): string {
|
|
407
|
-
return `
|
|
408
|
-
Client Capabilities Explanation:
|
|
409
|
-
|
|
410
|
-
Different Language Models (LLMs) and the MCP clients that use them have varying limitations in how they handle tool schemas. Capability flags allow you to inform the MCP server about these limitations.
|
|
411
|
-
|
|
412
|
-
When a capability flag is set to false, the MCP server will automatically adjust the tool schemas to work around that limitation, ensuring broader compatibility.
|
|
413
|
-
|
|
414
|
-
Available Capabilities:
|
|
415
|
-
|
|
416
|
-
# top-level-unions
|
|
417
|
-
Some clients/LLMs do not support JSON schemas with a union type (anyOf) at the root level. If a client lacks this capability, the MCP server splits tools with top-level unions into multiple separate tools, one for each variant in the union.
|
|
418
|
-
|
|
419
|
-
# refs
|
|
420
|
-
Some clients/LLMs do not support $ref pointers for schema reuse. If a client lacks this capability, the MCP server automatically inlines all references ($defs) directly into the schema. Properties that would cause circular references are removed during this process.
|
|
421
|
-
|
|
422
|
-
# valid-json
|
|
423
|
-
Some clients/LLMs may incorrectly send arguments as a JSON-encoded string instead of a proper JSON object. If a client *has* this capability, the MCP server will attempt to parse string values as JSON if the initial validation against the schema fails.
|
|
424
|
-
|
|
425
|
-
# unions
|
|
426
|
-
Some clients/LLMs do not support union types (anyOf) in JSON schemas. If a client lacks this capability, the MCP server removes all anyOf fields and uses only the first variant as the schema.
|
|
427
|
-
|
|
428
|
-
# formats
|
|
429
|
-
Some clients/LLMs do not support the 'format' keyword in JSON Schema specifications. If a client lacks this capability, the MCP server removes all format fields and appends the format information to the field's description in parentheses.
|
|
430
|
-
|
|
431
|
-
# tool-name-length=N
|
|
432
|
-
Some clients/LLMs impose a maximum length on tool names. If this capability is set, the MCP server will automatically truncate tool names exceeding the specified length (N), ensuring uniqueness by appending numbers if necessary.
|
|
433
|
-
|
|
434
|
-
Client Presets (--client):
|
|
435
|
-
Presets like '--client=openai-agents' or '--client=cursor' automatically configure these capabilities based on current known limitations of those clients, simplifying setup.
|
|
436
|
-
|
|
437
|
-
Current presets:
|
|
438
|
-
${JSON.stringify(knownClients, null, 2)}
|
|
439
|
-
`;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
function examples(): [string, string][] {
|
|
443
|
-
const firstEndpoint = endpoints[0]!;
|
|
444
|
-
const secondEndpoint =
|
|
445
|
-
endpoints.find((e) => e.metadata.resource !== firstEndpoint.metadata.resource) || endpoints[1];
|
|
446
|
-
const tag = endpoints.find((e) => e.metadata.tags.length > 0)?.metadata.tags[0];
|
|
447
|
-
const otherEndpoint = secondEndpoint || firstEndpoint;
|
|
448
|
-
|
|
449
|
-
return [
|
|
450
|
-
[
|
|
451
|
-
`--tool="${firstEndpoint.tool.name}" ${secondEndpoint ? `--tool="${secondEndpoint.tool.name}"` : ''}`,
|
|
452
|
-
'Include tools by name',
|
|
453
|
-
],
|
|
454
|
-
[
|
|
455
|
-
`--resource="${firstEndpoint.metadata.resource}" --operation="read"`,
|
|
456
|
-
'Filter by resource and operation',
|
|
457
|
-
],
|
|
458
|
-
[
|
|
459
|
-
`--resource="${otherEndpoint.metadata.resource}*" --no-tool="${otherEndpoint.tool.name}"`,
|
|
460
|
-
'Use resource wildcards and exclusions',
|
|
461
|
-
],
|
|
462
|
-
[`--client="cursor"`, 'Adjust schemas to be more compatible with Cursor'],
|
|
463
|
-
[
|
|
464
|
-
`--capability="top-level-unions" --capability="tool-name-length=40"`,
|
|
465
|
-
'Specify individual client capabilities',
|
|
466
|
-
],
|
|
467
|
-
[
|
|
468
|
-
`--client="cursor" --no-capability="tool-name-length"`,
|
|
469
|
-
'Use cursor client preset but remove tool name length limit',
|
|
470
|
-
],
|
|
471
|
-
...(tag ? [[`--tag="${tag}"`, 'Filter based on tags'] as [string, string]] : []),
|
|
472
|
-
];
|
|
473
|
-
}
|
package/src/server.ts
CHANGED
|
@@ -2,39 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import { Endpoint, endpoints, HandlerFunction, query } from './tools';
|
|
6
5
|
import {
|
|
7
6
|
CallToolRequestSchema,
|
|
8
7
|
ListToolsRequestSchema,
|
|
9
8
|
SetLevelRequestSchema,
|
|
10
|
-
Implementation,
|
|
11
|
-
Tool,
|
|
12
9
|
} from '@modelcontextprotocol/sdk/types.js';
|
|
13
10
|
import { ClientOptions } from '@zavudev/sdk';
|
|
14
11
|
import Zavudev from '@zavudev/sdk';
|
|
15
|
-
import {
|
|
16
|
-
applyCompatibilityTransformations,
|
|
17
|
-
ClientCapabilities,
|
|
18
|
-
defaultClientCapabilities,
|
|
19
|
-
knownClients,
|
|
20
|
-
parseEmbeddedJSON,
|
|
21
|
-
} from './compat';
|
|
22
|
-
import { dynamicTools } from './dynamic-tools';
|
|
23
12
|
import { codeTool } from './code-tool';
|
|
24
13
|
import docsSearchTool from './docs-search-tool';
|
|
25
14
|
import { McpOptions } from './options';
|
|
15
|
+
import { HandlerFunction, McpTool } from './types';
|
|
26
16
|
|
|
27
17
|
export { McpOptions } from './options';
|
|
28
|
-
export { ClientType } from './compat';
|
|
29
|
-
export { Filter } from './tools';
|
|
30
18
|
export { ClientOptions } from '@zavudev/sdk';
|
|
31
|
-
export { endpoints } from './tools';
|
|
32
19
|
|
|
33
20
|
export const newMcpServer = () =>
|
|
34
21
|
new McpServer(
|
|
35
22
|
{
|
|
36
23
|
name: 'zavudev_sdk_api',
|
|
37
|
-
version: '0.
|
|
24
|
+
version: '0.17.0',
|
|
38
25
|
},
|
|
39
26
|
{ capabilities: { tools: {}, logging: {} } },
|
|
40
27
|
);
|
|
@@ -52,25 +39,6 @@ export function initMcpServer(params: {
|
|
|
52
39
|
mcpOptions?: McpOptions;
|
|
53
40
|
}) {
|
|
54
41
|
const server = params.server instanceof McpServer ? params.server.server : params.server;
|
|
55
|
-
const mcpOptions = params.mcpOptions ?? {};
|
|
56
|
-
|
|
57
|
-
let providedEndpoints: Endpoint[] | null = null;
|
|
58
|
-
let endpointMap: Record<string, Endpoint> | null = null;
|
|
59
|
-
|
|
60
|
-
const initTools = async (implementation?: Implementation) => {
|
|
61
|
-
if (implementation && (!mcpOptions.client || mcpOptions.client === 'infer')) {
|
|
62
|
-
mcpOptions.client =
|
|
63
|
-
implementation.name.toLowerCase().includes('claude') ? 'claude'
|
|
64
|
-
: implementation.name.toLowerCase().includes('cursor') ? 'cursor'
|
|
65
|
-
: undefined;
|
|
66
|
-
mcpOptions.capabilities = {
|
|
67
|
-
...(mcpOptions.client && knownClients[mcpOptions.client]),
|
|
68
|
-
...mcpOptions.capabilities,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
providedEndpoints ??= await selectTools(endpoints, mcpOptions);
|
|
72
|
-
endpointMap ??= Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint]));
|
|
73
|
-
};
|
|
74
42
|
|
|
75
43
|
const logAtLevel =
|
|
76
44
|
(level: 'debug' | 'info' | 'warning' | 'error') =>
|
|
@@ -96,26 +64,23 @@ export function initMcpServer(params: {
|
|
|
96
64
|
},
|
|
97
65
|
});
|
|
98
66
|
|
|
67
|
+
const providedTools = selectTools(params.mcpOptions);
|
|
68
|
+
const toolMap = Object.fromEntries(providedTools.map((mcpTool) => [mcpTool.tool.name, mcpTool]));
|
|
69
|
+
|
|
99
70
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
100
|
-
if (providedEndpoints === null) {
|
|
101
|
-
await initTools(server.getClientVersion());
|
|
102
|
-
}
|
|
103
71
|
return {
|
|
104
|
-
tools:
|
|
72
|
+
tools: providedTools.map((mcpTool) => mcpTool.tool),
|
|
105
73
|
};
|
|
106
74
|
});
|
|
107
75
|
|
|
108
76
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
109
|
-
if (endpointMap === null) {
|
|
110
|
-
await initTools(server.getClientVersion());
|
|
111
|
-
}
|
|
112
77
|
const { name, arguments: args } = request.params;
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
78
|
+
const mcpTool = toolMap[name];
|
|
79
|
+
if (!mcpTool) {
|
|
115
80
|
throw new Error(`Unknown tool: ${name}`);
|
|
116
81
|
}
|
|
117
82
|
|
|
118
|
-
return executeHandler(
|
|
83
|
+
return executeHandler(mcpTool.handler, client, args);
|
|
119
84
|
});
|
|
120
85
|
|
|
121
86
|
server.setRequestHandler(SetLevelRequestSchema, async (request) => {
|
|
@@ -145,47 +110,22 @@ export function initMcpServer(params: {
|
|
|
145
110
|
/**
|
|
146
111
|
* Selects the tools to include in the MCP Server based on the provided options.
|
|
147
112
|
*/
|
|
148
|
-
export
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
let includedTools = filteredEndpoints.slice();
|
|
152
|
-
|
|
153
|
-
if (includedTools.length > 0) {
|
|
154
|
-
if (options?.includeDynamicTools) {
|
|
155
|
-
includedTools = dynamicTools(includedTools);
|
|
156
|
-
}
|
|
157
|
-
} else {
|
|
158
|
-
if (options?.includeAllTools) {
|
|
159
|
-
includedTools = endpoints.slice();
|
|
160
|
-
} else if (options?.includeDynamicTools) {
|
|
161
|
-
includedTools = dynamicTools(endpoints);
|
|
162
|
-
} else if (options?.includeCodeTools) {
|
|
163
|
-
includedTools = [await codeTool()];
|
|
164
|
-
} else {
|
|
165
|
-
includedTools = endpoints.slice();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
113
|
+
export function selectTools(options?: McpOptions): McpTool[] {
|
|
114
|
+
const includedTools = [codeTool()];
|
|
168
115
|
if (options?.includeDocsTools ?? true) {
|
|
169
116
|
includedTools.push(docsSearchTool);
|
|
170
117
|
}
|
|
171
|
-
|
|
172
|
-
return applyCompatibilityTransformations(includedTools, capabilities);
|
|
118
|
+
return includedTools;
|
|
173
119
|
}
|
|
174
120
|
|
|
175
121
|
/**
|
|
176
122
|
* Runs the provided handler with the given client and arguments.
|
|
177
123
|
*/
|
|
178
124
|
export async function executeHandler(
|
|
179
|
-
tool: Tool,
|
|
180
125
|
handler: HandlerFunction,
|
|
181
126
|
client: Zavudev,
|
|
182
127
|
args: Record<string, unknown> | undefined,
|
|
183
|
-
compatibilityOptions?: Partial<ClientCapabilities>,
|
|
184
128
|
) {
|
|
185
|
-
const options = { ...defaultClientCapabilities, ...compatibilityOptions };
|
|
186
|
-
if (!options.validJson && args) {
|
|
187
|
-
args = parseEmbeddedJSON(args, tool.inputSchema);
|
|
188
|
-
}
|
|
189
129
|
return await handler(client, args || {});
|
|
190
130
|
}
|
|
191
131
|
|
package/src/stdio.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
2
|
import { initMcpServer, newMcpServer } from './server';
|
|
3
|
-
import { McpOptions } from './options';
|
|
4
3
|
|
|
5
|
-
export const launchStdioServer = async (
|
|
4
|
+
export const launchStdioServer = async () => {
|
|
6
5
|
const server = newMcpServer();
|
|
7
6
|
|
|
8
|
-
initMcpServer({ server
|
|
7
|
+
initMcpServer({ server });
|
|
9
8
|
|
|
10
9
|
const transport = new StdioServerTransport();
|
|
11
10
|
await server.connect(transport);
|
package/stdio.d.mts
CHANGED
package/stdio.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,qBAQ7B,CAAC"}
|
package/stdio.d.ts
CHANGED
package/stdio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,qBAQ7B,CAAC"}
|
package/stdio.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.launchStdioServer = void 0;
|
|
4
4
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
5
5
|
const server_1 = require("./server.js");
|
|
6
|
-
const launchStdioServer = async (
|
|
6
|
+
const launchStdioServer = async () => {
|
|
7
7
|
const server = (0, server_1.newMcpServer)();
|
|
8
|
-
(0, server_1.initMcpServer)({ server
|
|
8
|
+
(0, server_1.initMcpServer)({ server });
|
|
9
9
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
10
10
|
await server.connect(transport);
|
|
11
11
|
console.error('MCP Server running on stdio');
|
package/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AACjF,wCAAuD;
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AACjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IAC1C,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;IAE9B,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAE1B,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
|