Skip to main content
Glama
nickweedon

Skeleton MCP Server

by nickweedon

create_item

Create new items with names, descriptions, and metadata in the Skeleton MCP Server. This tool generates unique IDs and returns complete item data for database integration.

Instructions

Create a new item.

Args: name: The name of the item (required) description: Optional description metadata: Optional key-value metadata

Returns: The created item data including the generated ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionNo
metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the create_item tool logic, generating a mock item ID and storing it in MOCK_ITEMS.
    async def create_item(
        name: str,
        description: str | None = None,
        metadata: dict[str, str] | None = None,
    ) -> dict[str, Any]:
        """
        Create a new item.
    
        Args:
            name: The name of the item (required)
            description: Optional description
            metadata: Optional key-value metadata
    
        Returns:
            The created item data including the generated ID
        """
        # In a real implementation:
        # client = get_client()
        # return client.post("items", data={"name": name, "description": description, "metadata": metadata})
    
        import uuid
        from datetime import datetime, timezone
    
        item_id = f"item-{uuid.uuid4().hex[:8]}"
        now = datetime.now(timezone.utc).isoformat().replace("+00:00", "Z")
    
        item = {
            "id": item_id,
            "name": name,
            "description": description,
            "metadata": metadata,
            "created_at": now,
            "updated_at": now,
        }
    
        MOCK_ITEMS[item_id] = item
        return item
  • Registers the create_item function from the example API as an MCP tool.
    mcp.tool()(example.create_item)
  • The function signature and docstring define the input schema (name required, optional description and metadata) and output (dict with item data).
    async def create_item(
        name: str,
        description: str | None = None,
        metadata: dict[str, str] | None = None,
    ) -> dict[str, Any]:
  • Imports the example module containing the create_item handler for registration.
    from .api import example

Tool Definition Quality

Score is being calculated. Check back soon.

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/nickweedon/mcp_server_template'

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