mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 15:03:57 +00:00
- Introduced core components for Telegram MCP integration, including server management, API helpers, and tool action parsers. - Implemented various tools for user and chat management, such as adding contacts, archiving chats, and sending messages. - Created utility functions for handling Telegram-specific actions and responses, improving interaction with the Telegram API. - Defined types and context for better type safety and clarity in tool implementations. These changes establish a comprehensive framework for Telegram MCP interactions, enhancing the application's capabilities in managing Telegram functionalities.
21 lines
561 B
TypeScript
21 lines
561 B
TypeScript
import type { MCPTool, MCPToolResult } from '../../types';
|
|
import type { TelegramMCPContext } from '../types';
|
|
import { notImplemented } from './notImplemented';
|
|
|
|
export const tool: MCPTool = {
|
|
name: 'block_user',
|
|
description: 'Block a user',
|
|
inputSchema: {
|
|
type: 'object',
|
|
properties: { user_id: { type: 'string', description: 'User ID' } },
|
|
required: ['user_id'],
|
|
},
|
|
};
|
|
|
|
export async function blockUser(
|
|
_args: Record<string, unknown>,
|
|
_context: TelegramMCPContext,
|
|
): Promise<MCPToolResult> {
|
|
return notImplemented('block_user');
|
|
}
|