mcp-claude-duo/mcp-partner/tools/set_status.js
StillHammer 66e5c677ea v3.0 - Conversation-based messaging system
Features:
- Direct conversations (1-to-1) auto-created and permanent
- Group conversations with leave/archive support
- Real-time messaging via long-polling
- Offline notifications via CLAUDE.md
- Auto-registration on MCP startup

Architecture:
- Broker: Express HTTP server + SQLite
- MCP Partner: Modular tools (one file per tool)
- Full documentation and API reference
2026-01-25 02:57:24 +07:00

42 lines
984 B
JavaScript

import { brokerFetch, myId, ensureRegistered } from "../shared.js";
export const definition = {
name: "set_status",
description: "Définit ton status visible par les autres partenaires.",
inputSchema: {
type: "object",
properties: {
message: {
type: "string",
description: "Ton status (ex: 'Working on auth module'). Vide pour effacer.",
},
},
},
};
export async function handler(args) {
try {
await ensureRegistered();
await brokerFetch(`/partners/${myId}/status`, {
method: "POST",
body: JSON.stringify({ message: args.message || null }),
});
if (args.message) {
return {
content: [{ type: "text", text: `Status: _${args.message}_` }],
};
} else {
return {
content: [{ type: "text", text: "Status effacé." }],
};
}
} catch (error) {
return {
content: [{ type: "text", text: `Erreur: ${error.message}` }],
isError: true,
};
}
}