Skip to content

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.


Generate a walkthrough for exploring a D-Bus service or an entire bus.

ParameterTypeDefaultDescription
busstring"session""session" or "system"
servicestring""Service name to explore; omit for a full bus walkthrough

When service is empty, the prompt generates a full exploration starting from the bus level:

  1. list_services(bus="{bus}") to see available services
  2. Pick a service and use list_objects() to see its object tree
  3. introspect() on interesting objects to see methods, properties, and signals
  4. get_all_properties() to read current state
  5. call_method() to interact with methods

When a specific service is provided, the prompt skips service listing and starts from the object tree:

  1. list_objects(bus="{bus}", service="{service}") to see the object tree
  2. introspect() on interesting objects to see methods, properties, and signals
  3. get_all_properties() to read current state
  4. call_method() to interact with methods

First encounter with an unfamiliar D-Bus service. The prompt provides a structured approach to understanding what a service exposes before interacting with it.


Generate a diagnostic walkthrough for troubleshooting a D-Bus service.

ParameterTypeDefaultDescription
servicestringrequiredService name to debug
busstring"session""session" or "system"
  1. Check registrationlist_services(bus="{bus}") to verify the service appears on the bus
  2. Introspect rootintrospect(bus="{bus}", service="{service}", object_path="/") to see the top-level structure
  3. Walk the object tree — find all endpoints the service exposes
  4. Read properties — read all properties on key interfaces to check state
  5. Ping — call Ping on org.freedesktop.DBus.Peer to verify the service is responsive

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.