matrix-mcp: document the bare name in the DM tool schemas, expand it once
This commit is contained in:
parent
64c0b8b3f0
commit
ccac95fcf4
1 changed files with 16 additions and 15 deletions
|
|
@ -57,7 +57,8 @@ struct SendMessageArgs {
|
|||
|
||||
#[derive(Debug, Deserialize, JsonSchema)]
|
||||
struct SendDmArgs {
|
||||
/// Matrix user id of the recipient (`@user:server`). DM room is
|
||||
/// Matrix user id of the recipient (`@user:server`), or just an agent's
|
||||
/// name such as `iris` for that agent on this homeserver. DM room is
|
||||
/// created if one doesn't already exist between this agent and
|
||||
/// the recipient.
|
||||
user_id: String,
|
||||
|
|
@ -87,8 +88,9 @@ struct SendFileArgs {
|
|||
|
||||
#[derive(Debug, Deserialize, JsonSchema)]
|
||||
struct OpenDmArgs {
|
||||
/// Matrix user id (`@user:server`) to open a DM with. The DM room is
|
||||
/// created if one doesn't already exist.
|
||||
/// Matrix user id (`@user:server`), or just an agent's name such as
|
||||
/// `iris` for that agent on this homeserver, to open a DM with. The DM
|
||||
/// room is created if one doesn't already exist.
|
||||
user_id: String,
|
||||
/// Matrix account to act as (a `name` from `services.hyperhive.agent.matrixAccounts`).
|
||||
/// Omit to use the agent's primary account.
|
||||
|
|
@ -308,7 +310,8 @@ impl MatrixMcp {
|
|||
}
|
||||
|
||||
#[tool(description = "Resolve (find-or-create) the DM room with `user_id` \
|
||||
(@user:server) and return its room id, without sending anything. Use the \
|
||||
(@user:server, or an agent's name such as `iris` for that agent on this \
|
||||
homeserver) and return its room id, without sending anything. Use the \
|
||||
returned room id with the room-based tools (`send_file`, `send_message`, \
|
||||
…) to deliver into the DM — there is no per-tool DM variant.")]
|
||||
async fn open_dm(&self, Parameters(args): Parameters<OpenDmArgs>) -> String {
|
||||
|
|
|
|||
Loading…
Reference in a new issue