@enfyra/mcp-server 0.0.76 → 0.0.77
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/package.json +1 -1
- package/src/mcp-server-entry.mjs +2 -2
package/package.json
CHANGED
package/src/mcp-server-entry.mjs
CHANGED
|
@@ -777,7 +777,7 @@ server.tool(
|
|
|
777
777
|
},
|
|
778
778
|
handler: {
|
|
779
779
|
runs: 'Main route logic, or canonical CRUD if no handler overrides.',
|
|
780
|
-
data: ['@BODY', '@QUERY', '@PARAMS', '@USER', '@UPLOADED_FILE for multipart request file metadata', '@REPOS.main', '@REPOS
|
|
780
|
+
data: ['@BODY', '@QUERY', '@PARAMS', '@USER', '@UPLOADED_FILE for multipart request file metadata', '@REPOS.main', '@REPOS.<table>', '@CACHE', '@HELPERS', '@STORAGE', '@PKGS', '@SOCKET emit helpers', '@TRIGGER'],
|
|
781
781
|
queryContract: 'When a handler wraps a canonical table read, pass through client fields/deep/sort/page/limit/meta/aggregate/debugMode unless the route is a clearly custom summary or workflow endpoint.',
|
|
782
782
|
returnBehavior: 'Return value becomes response body unless post-hook changes it.',
|
|
783
783
|
},
|
|
@@ -814,7 +814,7 @@ server.tool(
|
|
|
814
814
|
},
|
|
815
815
|
helpers: {
|
|
816
816
|
repos: {
|
|
817
|
-
scopes: '$repos.main
|
|
817
|
+
scopes: '$repos.main is the canonical repository for the route main table and preserves normal route query behavior. $repos.<table> is an explicit internal repository for table-specific logic. Do not generate $repos.secure.<table>; current runtime does not expose table methods there.',
|
|
818
818
|
mutationReturnShape: '$repos.<table>.create({ data }) and $repos.<table>.update({ id, data }) return a collection-shaped result: { data: [...], count? }. data is always an array for create/update, even for one created/updated record. If a script needs the single record object, it must read result.data[0] or result.data?.[0] ?? null.',
|
|
819
819
|
preferredExample: 'const result = await @REPOS.main.create({ data: @BODY }); const record = result.data?.[0] ?? null; return record;',
|
|
820
820
|
wrongSingleRecordAccess: 'Do not use result.data.id, do not return result.data when one object is expected, and do not assume create/update returns the bare row object.',
|