Skip to main content
Glama
onion-ai

onion-mcp-server

Official
by onion-ai

sys_uuid

Produce one or more UUIDs using version 1 (time-based) or 4 (random), with optional uppercase formatting.

Instructions

生成 UUID。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoUUID 版本:1(基于时间)或 4(随机,默认)
countNo生成数量(1~20,默认 1)
upperNo是否大写(默认 false)

Implementation Reference

  • The `_sys_uuid` function executes the core logic: reads args (version, count, upper), generates UUIDs using uuid1() or uuid4(), optionally uppercases them, and returns as text content.
    def _sys_uuid(args: dict) -> list[types.TextContent]:
        version = int(args.get("version", 4))
        count   = max(1, min(20, int(args.get("count", 1))))
        upper   = bool(args.get("upper", False))
    
        results = []
        for _ in range(count):
            u = _uuid.uuid1() if version == 1 else _uuid.uuid4()
            results.append(str(u).upper() if upper else str(u))
    
        return [types.TextContent(type="text", text="\n".join(results))]
  • The `sys_uuid` tool definition with inputSchema: version (1 or 4, default 4), count (1-20, default 1), upper (boolean, default false).
    types.Tool(
        name="sys_uuid",
        description="生成 UUID。",
        inputSchema={
            "type": "object",
            "properties": {
                "version": {
                    "type":        "integer",
                    "description": "UUID 版本:1(基于时间)或 4(随机,默认)",
                    "enum":        [1, 4],
                    "default":     4,
                },
                "count": {
                    "type":        "integer",
                    "description": "生成数量(1~20,默认 1)",
                    "default":     1,
                },
                "upper": {
                    "type":        "boolean",
                    "description": "是否大写(默认 false)",
                    "default":     False,
                },
            },
        },
  • The `handle_system` dispatcher registers "sys_uuid" -> `_sys_uuid` in a handlers dict, called from server.py's call_tool handler.
    async def handle_system(name: str, arguments: dict) -> list[types.TextContent]:
        handlers = {
            "sys_time":       _sys_time,
            "sys_uuid":       _sys_uuid,
            "sys_hash":       _sys_hash,
            "sys_base64":     _sys_base64,
            "sys_url_encode": _sys_url_encode,
            "sys_json_valid": _sys_json_valid,
        }
        fn = handlers.get(name)
        if fn is None:
            raise ValueError(f"未知 system 工具: {name}")
        return fn(arguments)
  • In server.py, 'sys_uuid' is registered in the _HANDLERS routing table by iterating over SYSTEM_TOOLS and mapping each tool name to handle_system.
    # ── 路由表 ────────────────────────────────────────────────────
    _HANDLERS: dict = {}
    for _t in AI_TOOLS:     
        _HANDLERS[_t.name] = handle_ai
    for _t in CODE_TOOLS:   
        _HANDLERS[_t.name] = handle_code
    for _t in TEXT_TOOLS:   
        _HANDLERS[_t.name] = handle_text
    for _t in DATA_TOOLS:   
        _HANDLERS[_t.name] = handle_data
    for _t in WEB_TOOLS:    
        _HANDLERS[_t.name] = handle_web
    for _t in SYSTEM_TOOLS: 
        _HANDLERS[_t.name] = handle_system
  • The 'sys_uuid' Tool object is included in ALL_TOOLS via the *SYSTEM_TOOLS spread, making it available via the list_tools() MCP endpoint.
    ALL_TOOLS: list[types.Tool] = [
        *AI_TOOLS,
        *CODE_TOOLS,
        *TEXT_TOOLS,
        *DATA_TOOLS,
        *WEB_TOOLS,
        *SYSTEM_TOOLS,
    ]
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description does not disclose behavioral traits (e.g., output format, determinism). The schema partially covers parameter behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with no wasted words. However, the structure is minimal, lacking any introduction or output explanation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Missing output schema and behavioral details. The description is too short to be complete; parameters and usage are inferred solely from schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% of parameters with descriptions. The description adds no extra meaning, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Generate UUID', which is a specific verb+resource. It accurately conveys the tool's function, though it is minimal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like sys_hash. The description lacks context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/onion-ai/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server