ldh-AddObjectBlock
Appends an object block to a LinkedDataHub document using sequence properties, referencing an external resource by URI with optional title, description, fragment, and display mode.
Instructions
Appends an object block to a LinkedDataHub document content mode using sequence properties. Only XHTML blocks and object blocks are shown in the content mode. Other resources can still be added to the document, but they will not be displayed in the content mode.
Object blocks reference external resources via URI and can have different display modes.
Only RDF Linked Data objects can be rendered by using display modes, so if you think you're using an RDF URI value, make sure it returns a valid RDF resource (e.g. use the GET operation to verify).
Non-RDF resources (for example images) will be embedded using HTML <object> element.
Possible display modes include:
- https://w3id.org/atomgraph/client#ReadMode: Default mode for displaying the object.
- https://w3id.org/atomgraph/client#GraphMode: Displays the object as a graph.
- https://w3id.org/atomgraph/client#MapMode: Displays the object as a map.
- https://w3id.org/atomgraph/client#ChartMode: Displays the object as a chart.
This tool:
- Fetches the current document to find the next sequence number (rdf:_1, rdf:_2, etc.)
- Creates an ldh:Object resource with rdf:value pointing to the target resource URI
- Posts the new object block to the target document
- Supports optional title, description, fragment identifier, and display mode
Returns True if the operation was successful, False otherwise.
Note: This operation does not return the updated graph, it only confirms the success of the operation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"value": "<value>"
},
"name": "ldh-AddObjectBlock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URI of the document to append the object block to. | |
| mode | No | Optional URI of the mode the block shows its resource in (an object mode, not a view's layout). Defaults to ReadMode. | https://w3id.org/atomgraph/client#ReadMode |
| graph | No | Optional URI of the document that describes the value, read in place of dereferencing the value's URI (ldh:graph). | |
| title | No | Optional title for the object block. | |
| value | Yes | URI of the object resource to reference. | |
| fragment | No | Optional fragment identifier for the object block URI (e.g., 'intro' creates #intro). | |
| description | No | Optional description for the object block. |