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
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it states this is a creation operation (implying mutation), it doesn't mention permission requirements, whether the operation is idempotent, rate limits, error conditions, or what happens on conflicts. The return statement is helpful but minimal.

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?

The description is well-structured with clear sections (Args, Returns) and uses minimal words to convey the essential information. Every sentence serves a purpose, though the initial 'Create a new item.' could be slightly more informative.

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

Completeness3/5

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

Given the tool has 3 parameters with 0% schema description coverage and no annotations, the description does an adequate job covering the basics but lacks depth. The presence of an output schema means the description doesn't need to detail return values, but it should provide more behavioral context for a mutation tool.

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?

The description explicitly lists all three parameters (name, description, metadata) with brief explanations, which adds value since schema description coverage is 0%. However, it doesn't elaborate on constraints (e.g., name length, metadata format) or provide examples, leaving some ambiguity about what constitutes valid input.

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 the verb ('Create') and resource ('item'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'update_item' beyond the obvious creation vs. update distinction, nor does it specify what type of item is being created (e.g., file, record, object).

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?

The description provides no guidance on when to use this tool versus alternatives like 'update_item' or 'list_items'. It doesn't mention prerequisites, dependencies, or any context about when item creation is appropriate versus other operations.

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

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