Skip to main content
Glama
nickweedon

Skeleton MCP Server

by nickweedon

get_item

Retrieve specific item data by providing its unique identifier. Use this tool to fetch detailed information about any item stored in the system when you have the item ID.

Instructions

Get a specific item by ID.

Args: item_id: The unique identifier of the item

Returns: The item data if found

Raises: ValueError: If the item is not found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes

Implementation Reference

  • Implementation of the get_item tool handler. Retrieves a specific item by its ID from the MOCK_ITEMS dictionary, raises ValueError if not found. Includes type hints and comprehensive docstring describing input/output.
    async def get_item(item_id: str) -> dict[str, Any]: """ Get a specific item by ID. Args: item_id: The unique identifier of the item Returns: The item data if found Raises: ValueError: If the item is not found """ # In a real implementation: # client = get_client() # return client.get(f"items/{item_id}") if item_id not in MOCK_ITEMS: raise ValueError(f"Item not found: {item_id}") return MOCK_ITEMS[item_id]
  • Registration of the get_item tool using the FastMCP mcp.tool() decorator, making it available to MCP clients.
    mcp.tool()(example.get_item)

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