@assetlab/mcp-server 1.16.1 → 1.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 +1 -1
- package/dist/tools-write.js +14 -0
- package/dist/tools-write.js.map +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +15 -0
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Works with **Claude**, **ChatGPT**, **Microsoft Copilot**, and any MCP-compatibl
|
|
|
13
13
|
### Claude.ai
|
|
14
14
|
|
|
15
15
|
1. Create an API key in **AssetLab → Settings → API Keys**
|
|
16
|
-
2. In Claude.ai, go to **Settings →
|
|
16
|
+
2. In Claude.ai, go to **Settings → Connectors → Add connector**
|
|
17
17
|
3. Paste the connector URL: `https://mcp.assetlab.ca`
|
|
18
18
|
4. When prompted for auth, paste your API key (`al_live_...`)
|
|
19
19
|
|
package/dist/tools-write.js
CHANGED
|
@@ -2252,6 +2252,20 @@ export function registerWriteTools(server, client) {
|
|
|
2252
2252
|
return formatError(err);
|
|
2253
2253
|
}
|
|
2254
2254
|
});
|
|
2255
|
+
server.tool('upload_file', 'Upload a file to AssetLab storage by sending its bytes inline (base64). The AssetLab backend performs the storage upload server-side — use this tool when the client cannot PUT directly to Supabase Storage (e.g. Claude integrations whose outbound network blocks arbitrary supabase.co hosts). Returns { path, public_url, bucket, file_size, content_type }. After uploading, pass path or public_url to the appropriate record tool (update_asset image_url, create_asset_document file_path, update_work_order image_url, create_attachment file_path, create_project_document file_path, create_contract_document file_path). Server limit is ~10 MB decoded; MCP arg ceiling effectively caps file size around 700 KB–1 MB. For larger files, use create_upload_url instead. Requires upload_urls:write scope.', {
|
|
2256
|
+
bucket: z.enum(['documents', 'attachments', 'project-documents', 'contract-documents', 'asset-images']).describe('Storage bucket (required). Use "asset-images" for asset photos, "attachments" for work-order/PM attachments.'),
|
|
2257
|
+
file_name: z.string().min(1).max(500).describe('File name including extension (required)'),
|
|
2258
|
+
content_base64: z.string().min(1).describe('File contents base64-encoded (required). Data URI prefixes like "data:image/png;base64," are stripped automatically.'),
|
|
2259
|
+
content_type: z.string().max(200).optional().describe('MIME type (e.g. image/jpeg, application/pdf). Defaults to application/octet-stream.'),
|
|
2260
|
+
}, async (params) => {
|
|
2261
|
+
try {
|
|
2262
|
+
const result = await client.create('upload-files', buildBody(params));
|
|
2263
|
+
return formatResult(result);
|
|
2264
|
+
}
|
|
2265
|
+
catch (err) {
|
|
2266
|
+
return formatError(err);
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2255
2269
|
// ============================================================
|
|
2256
2270
|
// Asset Documents (scope: asset_documents)
|
|
2257
2271
|
// ============================================================
|