Prompts
mcdbus provides two prompt templates that generate step-by-step instructions for common workflows. Prompts do not execute tools directly — they produce text that guides the model through a sequence of tool calls.
explore_service
Section titled “explore_service”Generate a walkthrough for exploring a D-Bus service or an entire bus.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
bus | string | "session" | "session" or "system" |
service | string | "" | Service name to explore; omit for a full bus walkthrough |
Without a service (5 steps)
Section titled “Without a service (5 steps)”When service is empty, the prompt generates a full exploration starting from the bus level:
list_services(bus="{bus}")to see available services- Pick a service and use
list_objects()to see its object tree introspect()on interesting objects to see methods, properties, and signalsget_all_properties()to read current statecall_method()to interact with methods
With a service (4 steps)
Section titled “With a service (4 steps)”When a specific service is provided, the prompt skips service listing and starts from the object tree:
list_objects(bus="{bus}", service="{service}")to see the object treeintrospect()on interesting objects to see methods, properties, and signalsget_all_properties()to read current statecall_method()to interact with methods
When to use
Section titled “When to use”First encounter with an unfamiliar D-Bus service. The prompt provides a structured approach to understanding what a service exposes before interacting with it.
debug_service
Section titled “debug_service”Generate a diagnostic walkthrough for troubleshooting a D-Bus service.
Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
service | string | required | Service name to debug |
bus | string | "session" | "session" or "system" |
Generated steps (5)
Section titled “Generated steps (5)”- Check registration —
list_services(bus="{bus}")to verify the service appears on the bus - Introspect root —
introspect(bus="{bus}", service="{service}", object_path="/")to see the top-level structure - Walk the object tree — find all endpoints the service exposes
- Read properties — read all properties on key interfaces to check state
- Ping — call
Pingonorg.freedesktop.DBus.Peerto verify the service is responsive
When to use
Section titled “When to use”Troubleshooting a service that is not responding as expected, returning errors, or that you suspect may not be running. The diagnostic sequence moves from coarse (is it registered?) to fine (does it respond to pings?), helping isolate where the problem lies.