/
pickling
/
mcp-sourcecontrol-python
Обзор
Документация
Войти
/
pickling
/
mcp-sourcecontrol-python
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/mcp_sourcecontrol/tools/get_user.py
30 строк
747 B
pickling-21
Python-порт mcp-sourcecontrol: 20 инструментов, stdio и Streamable HTTP
29 июл 2026, 02:18
29 июл 2026, 02:18
bc8bde4
Код
Авторство
О чём код?
"""MCP-инструмент git_get_user.""" from typing import Annotated from pydantic import Field, StringConstraints from ..runtime import current_client from .annotations import READ_ONLY from .define import ToolDefinition from .formatting import to_json async def _handler( username: Annotated[ str, StringConstraints(strip_whitespace=True, min_length=1), Field(description="SourceControl username"), ], ) -> str: result = await current_client().get_user(username) return to_json(result) TOOL = ToolDefinition( name="git_get_user", group="read", description="Get public profile information about a SourceControl user by username.", annotations=READ_ONLY, handler=_handler, )