Eclipse Ditto
v0.1.1MCP server for the Eclipse Ditto digital twin HTTP API (things, policies, connections, more).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_things List Things
Search/list digital twins (things) registered in Ditto. Wraps GET /api/2/search/things.
| Parameter | Type | Description |
|---|---|---|
fields | Optional list of field selectors to project the response (e.g. ['thingId', 'attributes']). | |
filter | Ditto RQL filter expression, e.g. eq(attributes/location,"lab-1") or gt(features/temperature/properties/value,20). | |
limit | integer | Maximum number of things to return. |
namespaces | Restrict the search to these namespaces (e.g. ['org.eclipse.ditto']). Omit to search all. |
count_things Count Things
Count things matching a search filter, without fetching them. Wraps GET /api/2/search/things/count.
| Parameter | Type | Description |
|---|---|---|
filter | Ditto RQL filter expression. | |
namespaces | Restrict the count to these namespaces. |
get_things Get Things
Bulk-fetch multiple things by ID in one request. Wraps GET /api/2/things?ids=...
| Parameter | Type | Description |
|---|---|---|
thing_ids * | array | Thing IDs to fetch in a single request. |
fields | Optional list of field selectors to project the response (e.g. ['thingId', 'attributes']). |
get_thing Get Thing
Fetch the full digital twin (attributes and features) for a thing. Wraps GET /api/2/things/{thingId}.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
fields | Optional list of field selectors to project the response (e.g. ['thingId', 'attributes']). |
put_thing Put Thing
Create a new thing, or replace an existing one (with overwrite=True). Wraps PUT /api/2/things/{thingId}. Uses If-None-Match to make the create-only (overwrite=False) path race-free rather than check-then-set.
| Parameter | Type | Description |
|---|---|---|
thing * | object | Full thing JSON (attributes, features, definition, policyId). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
patch_thing Patch Thing
Partially update a thing (creates it if it doesn't exist yet). Wraps PATCH /api/2/things/{thingId} with Content-Type: application/merge-patch+json.
| Parameter | Type | Description |
|---|---|---|
patch * | object | RFC-7396 JSON Merge Patch document. A null value deletes that key from the thing. |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
delete_thing Delete Thing
Delete a thing. Wraps DELETE /api/2/things/{thingId}. Irreversible.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
get_thing_policy_id Get Thing Policy Id
Get the policy ID controlling access to a thing. Wraps GET /things/{thingId}/policyId.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
set_thing_policy_id Set Thing Policy Id
Repoint a thing at a different policy. Wraps PUT /things/{thingId}/policyId.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Policy ID to attach to this thing. |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
get_thing_definition Get Thing Definition
Get a thing's definition (WoT model reference). Wraps GET /things/{thingId}/definition.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
set_thing_definition Set Thing Definition
Set a thing's definition. Wraps PUT /things/{thingId}/definition.
| Parameter | Type | Description |
|---|---|---|
definition * | string | Definition identifier, e.g. 'com.acme:coffeebrewer:0.1.0'. |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
delete_thing_definition Delete Thing Definition
Remove a thing's definition. Wraps DELETE /things/{thingId}/definition.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
whoami Whoami
Return the identity Ditto has authenticated this connector as. Wraps GET /api/2/whoami. Useful to sanity-check DITTO_USERNAME/DITTO_PASSWORD/DITTO_BEARER_TOKEN configuration.
get_thing_attributes Get Thing Attributes
Get a thing's attributes, or one attribute by JSON pointer path. Wraps GET /things/{thingId}/attributes[/{path}].
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
set_thing_attributes Set Thing Attributes
Set a thing's whole attributes object, or one attribute by path. Wraps PUT /things/{thingId}/attributes[/{path}].
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
value * | Value to set. A JSON object if path is omitted, any JSON value otherwise. | |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
delete_thing_attributes Delete Thing Attributes
Delete a thing's whole attributes object, or one attribute by path. Wraps DELETE /things/{thingId}/attributes[/{path}].
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
get_thing_features Get Thing Features
Fetch only the feature state (sensor/actuator data) for a thing. Wraps GET /api/2/things/{thingId}/features. Ditto returns 404 both when the thing doesn't exist and when it exists but has no features defined; both cases are normalized here to an empty dict.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
get_feature Get Feature
Fetch a single feature (definition + properties + desiredProperties). Wraps GET /things/{thingId}/features/{featureId}.
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
put_feature Put Feature
Create or replace a whole feature. Wraps PUT /things/{thingId}/features/{featureId}.
| Parameter | Type | Description |
|---|---|---|
feature * | object | Full feature JSON (definition, properties). |
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
delete_feature Delete Feature
Delete a whole feature. Wraps DELETE /things/{thingId}/features/{featureId}.
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
get_feature_properties Get Feature Properties
Get a feature's properties (or desiredProperties), or one property by path. Wraps GET /things/{thingId}/features/{featureId}/(desired)properties[/{path}].
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
desired | boolean | Read desiredProperties instead of properties. |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
set_feature_properties Set Feature Properties
Set a feature's whole properties (or desiredProperties) object, or one property by path. Wraps PUT /things/{thingId}/features/{featureId}/(desired)properties[/{path}].
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
value * | Value to set. A JSON object if path is omitted, any JSON value otherwise. | |
desired | boolean | Write desiredProperties instead of properties. |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
delete_feature_properties Delete Feature Properties
Delete a feature's whole properties (or desiredProperties) object, or one property by path. Wraps DELETE /things/{thingId}/features/{featureId}/(desired)properties[/{path}].
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
desired | boolean | Delete from desiredProperties instead of properties. |
path | Optional RFC-6901 JSON pointer path within the resource (e.g. 'configuration/brewingTemp'). Omit to target the whole resource. |
get_feature_definition Get Feature Definition
Get a feature's definition. Wraps GET .../features/{featureId}/definition.
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
set_feature_definition Set Feature Definition
Set a feature's definition. Wraps PUT .../features/{featureId}/definition.
| Parameter | Type | Description |
|---|---|---|
definition * | array | List of definition identifiers, e.g. ['com.acme:coffeebrewer:0.1.0']. |
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
delete_feature_definition Delete Feature Definition
Remove a feature's definition. Wraps DELETE .../features/{featureId}/definition.
| Parameter | Type | Description |
|---|---|---|
feature_id * | string | Feature ID within the thing (e.g. 'temperature'). |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
send_message Send Message
Send a live message to (or from) a thing or one of its features. Wraps POST /things/{thingId}/[features/{featureId}/]{direction}/messages/{subject}.
| Parameter | Type | Description |
|---|---|---|
payload * | Message payload. Sent as JSON. | |
subject * | string | Message subject, e.g. 'makeCoffee'. |
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
direction | string | 'inbox' sends TO the thing/feature, 'outbox' FROM it. |
feature_id | Scope the message to this feature instead of the whole thing. | |
timeout | integer | Seconds to wait for a response. 0 sends fire-and-forget. |
claim_thing Claim Thing
Send a claim message to gain access to a thing. Wraps POST /things/{thingId}/inbox/claim.
| Parameter | Type | Description |
|---|---|---|
thing_id * | string | Ditto thing ID in the form 'namespace:name' (e.g. 'org.eclipse.ditto:my-thing'). |
payload | Optional claim payload sent to the thing's registered handler. | |
timeout | integer | Seconds to wait for a response. |
get_policy Get Policy
Fetch a policy. Wraps GET /api/2/policies/{policyId}.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
put_policy Put Policy
Create a new policy, or replace an existing one (with overwrite=True). Wraps PUT /api/2/policies/{policyId}.
| Parameter | Type | Description |
|---|---|---|
policy * | object | Full policy JSON (entries with subjects/resources). |
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
delete_policy Delete Policy
Delete a policy. Wraps DELETE /api/2/policies/{policyId}. Irreversible. Note: things still referencing this policy will become inaccessible.
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
get_policy_entries Get Policy Entries
Get all policy entries, or one entry by label. Wraps GET /policies/{policyId}/entries[/{label}].
| Parameter | Type | Description |
|---|---|---|
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
label | Specific entry label to fetch. Omit to fetch all entries. |
set_policy_entry Set Policy Entry
Create or replace one policy entry. Wraps PUT /policies/{policyId}/entries/{label}.
| Parameter | Type | Description |
|---|---|---|
entry * | object | Policy entry JSON: {'subjects': {...}, 'resources': {...}}. |
label * | string | Entry label, e.g. 'DEFAULT' or 'DEVICES'. |
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
overwrite | boolean | If False (default), fails if the resource already exists. Set True to replace it. |
delete_policy_entry Delete Policy Entry
Delete one policy entry. Wraps DELETE /policies/{policyId}/entries/{label}.
| Parameter | Type | Description |
|---|---|---|
label * | string | Entry label to delete. |
policy_id * | string | Ditto policy ID in the form 'namespace:name'. |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
list_connections List Connections
List all configured connections. Wraps GET /api/2/connections. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
ids_only | boolean | Return only connection IDs, not full configs. |
get_connection Get Connection
Fetch a connection's config. Wraps GET /api/2/connections/{connectionId}. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | Ditto connection ID. |
create_connection Create Connection
Create a new connection; its ID is generated by Ditto. Wraps POST /api/2/connections. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection * | object | New connection JSON (connectionType, connectionStatus, sources, targets, ...). |
dry_run | boolean | If True, only test connectivity without persisting the connection. |
update_connection Update Connection
Update an existing connection's config. Wraps PUT /api/2/connections/{connectionId}. Unlike thing/policy PUT, this only updates — Ditto returns 404 if the connection doesn't already exist. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection * | object | Full replacement connection JSON. |
connection_id * | string | Ditto connection ID. |
delete_connection Delete Connection
Delete a connection. Wraps DELETE /api/2/connections/{connectionId}. Irreversible. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | Ditto connection ID. |
confirm | boolean | Must be explicitly set to True to perform this delete. Safety gate against accidental destructive calls. |
get_connection_status Get Connection Status
Get a connection's live status. Wraps GET /connections/{connectionId}/status. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | Ditto connection ID. |
get_connection_metrics Get Connection Metrics
Get a connection's metrics. Wraps GET /connections/{connectionId}/metrics. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | Ditto connection ID. |
get_connection_logs Get Connection Logs
Get a connection's logs. Wraps GET /connections/{connectionId}/logs. Logging must first be enabled via send_connection_command(connection_id, "connectivity.commands:enableConnectionLogs") — it's on by default when a connection is created or opened. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | Ditto connection ID. |
send_connection_command Send Connection Command
Send a lifecycle/diagnostic command to a connection. Wraps POST /connections/{connectionId}/command. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
command * | string | One of: connectivity.commands:openConnection, connectivity.commands:closeConnection, connectivity.commands:resetConnectionMetrics, connectivity.commands:enableConnectionLogs, connectivity.commands:res… |
connection_id * | string | Ditto connection ID. |
get_logging_config Get Logging Config
Get currently configured log levels. Wraps GET /devops/logging[/{moduleName}]. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
module_name | Specific service module (e.g. 'gateway'). Omit for all. |
set_logging_config Set Logging Config
Set a log level for a logger. Wraps PUT /devops/logging[/{moduleName}]. Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
level * | string | Log level, e.g. 'INFO', 'DEBUG', 'WARN', 'ERROR'. |
logger * | string | Logger/package name, e.g. 'org.eclipse.ditto'. |
module_name | Restrict the change to this service module. Omit for all. |
get_devops_config Get Devops Config
Get cluster-wide runtime configuration. Wraps GET /devops/config?path=... Requires devops credentials.
| Parameter | Type | Description |
|---|---|---|
path | Dotted config path to retrieve, e.g. 'ditto.gateway.authentication'. Strongly recommended to avoid a huge response. |
send_devops_piggyback Send Devops Piggyback
Send a low-level admin (piggyback) command to the Ditto cluster. Wraps POST /devops/piggyback[/{serviceName}[/{instanceIndex}]]. Requires devops credentials. This is Ditto's most powerful/least guarded admin API — use with care.
| Parameter | Type | Description |
|---|---|---|
command * | object | Piggyback command body, see Ditto DevOps API docs for shapes. |
instance_index | Restrict to this service instance. Requires service_name. | |
service_name | Restrict to this service (e.g. 'things'). Omit to broadcast. | |
timeout | Seconds to wait for a response. |
poll_thing_changes Poll Thing Changes
Open a short-lived SSE connection and collect live thing-change events. Approximates Ditto's persistent-connection change feed (GET /api/2/things with Accept: text/event-stream) within a single request/response tool call. Each event is a partial update (only the changed portion of the thing). Ditto's SSE stream sends periodic empty `data:` keepalive lines even when nothing has changed; the deadline is checked on every line received (including keepalives), not just on real events, so this always returns within duration_seconds regardless of how quiet or chatty the stream is.
| Parameter | Type | Description |
|---|---|---|
duration_seconds | number | Wall-clock cutoff: stop listening after this many seconds. |
fields | Optional list of field selectors to project the response (e.g. ['thingId', 'attributes']). | |
filter | Ditto RQL filter expression. | |
max_events | integer | Stop early once this many events are collected. |
namespaces | Restrict to these namespaces. | |
thing_ids | Restrict to these thing IDs. Omit to watch all visible things. |