Tool Details: asset_content

Basic Information

Tool Name:asset_content
Asset Name:Get Asset Content
Description:Retrieve bytes by any content reference: an asset address, workspace path, file:// root path, or DLFS path. Returned as a hex-encoded Blob with contentType when known. Returns {truncated: true, size} if it exceeds maxSize (default 1MB). Use asset_get for metadata; raw file/DLFS references have content but no asset metadata.
Adapter:asset
Asset Hash:0x243e495b531aa5f48721ffa2fde3677a83c09991384dbba164feaa8060ec3802
Input
PropertyTypeDescription
idstringDeprecated alias for ref.
maxSizeintegerMaximum content size in bytes (default 1000000). If exceeded, returns truncated: true with the size.
refstringContent reference: asset hash/path/DID URL, workspace path, file://<root>/<path> (file:/<root>/<path> is the HTTP-safe equivalent), dlfs/<drive>/<path>, or owner DID /dlfs/ path.
Output
PropertyTypeDescription
refstringContent reference (echoed)
contentTypestringDeclared or provider-inferred MIME type, when known
sizeintegerContent size in bytes (present when truncated)
truncatedbooleanTrue if content exceeds maxSize
hasContentbooleanTrue if the resolved address has a content payload. An existing metadata-only asset returns exists: true and hasContent: false.
valuestringContent as hex-encoded Blob (0x...). Present when hasContent is true and not truncated.
idstringCompatibility alias for ref
messagestringDiagnostic explaining why an existing asset has no content payload.
existsbooleanTrue if the reference resolved

MCP Tool Usage Examples

This tool can be called via the MCP (Model Context Protocol) endpoint. Here are examples of how to use it:

JSON-RPC Call Example:

POST to https://venue-test.covia.ai/mcp

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "asset_content",
    "arguments": {
      "input": "your input here"
    }
  }
}
cURL Example:
curl -X POST https://venue-test.covia.ai/mcp \\
  -H "Content-Type: application/json" \\
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "asset_content",
      "arguments": {
        "input": "your input here"
      }
    }
  }'
Python Example:
import requests
import json

url = "https://venue-test.covia.ai/mcp"
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "asset_content",
        "arguments": {
            "input": "your input here"
        }
    }
}

response = requests.post(url, json=payload)
result = response.json()
print(result)
JavaScript/Node.js Example:
const fetch = require('node-fetch');

const url = 'https://venue-test.covia.ai/mcp';
const payload = {
    jsonrpc: '2.0',
    id: 1,
    method: 'tools/call',
    params: {
        name: 'asset_content',
        arguments: {
            input: 'your input here'
        }
    }
};

fetch(url, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data));

Asset Metadata

{
  "name": "Get Asset Content",
  "description": "Retrieve bytes by any content reference: an asset address, workspace path, file:// root path, or DLFS path. Returned as a hex-encoded Blob with contentType when known. Returns {truncated: true, size} if it exceeds maxSize (default 1MB). Use asset_get for metadata; raw file/DLFS references have content but no asset metadata.",
  "dateCreated": "2026-03-31T00:00:00Z",
	"operation": {
		"adapter": "asset:content",
		"readOnly": true,
    "toolName": "asset_content",
    "input": {
      "type": "object",
      "properties": {
        "ref": { "type": "string", "description": "Content reference: asset hash/path/DID URL, workspace path, file://<root>/<path> (file:/<root>/<path> is the HTTP-safe equivalent), dlfs/<drive>/<path>, or owner DID /dlfs/ path." },
        "id": { "type": "string", "deprecated": true, "description": "Deprecated alias for ref." },
        "maxSize": { "type": "integer", "description": "Maximum content size in bytes (default 1000000). If exceeded, returns truncated: true with the size." }
      },
      "anyOf": [{ "required": ["ref"] }, { "required": ["id"] }]
    },
    "output": {
      "type": "object",
      "properties": {
        "ref": { "type": "string", "description": "Content reference (echoed)" },
        "id": { "type": "string", "deprecated": true, "description": "Compatibility alias for ref" },
        "exists": { "type": "boolean", "description": "True if the reference resolved" },
        "hasContent": { "type": "boolean", "description": "True if the resolved address has a content payload. An existing metadata-only asset returns exists: true and hasContent: false." },
        "contentType": { "type": "string", "description": "Declared or provider-inferred MIME type, when known" },
        "value": { "type": "string", "description": "Content as hex-encoded Blob (0x...). Present when hasContent is true and not truncated." },
        "message": { "type": "string", "description": "Diagnostic explaining why an existing asset has no content payload." },
        "truncated": { "type": "boolean", "description": "True if content exceeds maxSize" },
        "size": { "type": "integer", "description": "Content size in bytes (present when truncated)" }
      }
    }
  }
}

Navigation

Back to adapter details

Back to all adapters

Back to index