Skip to main content
Glama

f0_make_randomvalues MCP Server

models.py3.32 kB
""" Pydantic data models for MCP server Defines structured data schemas for tools and resources """ from pydantic import BaseModel, Field from typing import List, Optional from datetime import datetime class RandomNumberResult(BaseModel): """ Structured output for random number generation. Contains the generated numbers along with metadata about the generation parameters and timestamp. """ numbers: List[int] = Field( description="List of generated random numbers" ) count: int = Field( description="Number of values generated" ) min_value: int = Field( description="Minimum value in range" ) max_value: int = Field( description="Maximum value in range" ) timestamp: str = Field( description="Generation timestamp in ISO format" ) seed: Optional[int] = Field( default=None, description="Random seed used for reproducibility (if specified)" ) class SaveResult(BaseModel): """ Result of saving data to file. Indicates success/failure and provides file information. """ success: bool = Field( description="Whether the save operation succeeded" ) filepath: str = Field( description="Absolute path to saved file" ) count: int = Field( description="Number of values saved" ) timestamp: str = Field( description="Save timestamp in ISO format" ) error: Optional[str] = Field( default=None, description="Error message if save failed" ) class StatisticsResult(BaseModel): """ Statistical analysis result. Contains common statistical measures computed from data. """ mean: float = Field( description="Arithmetic mean (average)" ) median: float = Field( description="Median value" ) std_dev: float = Field( description="Standard deviation" ) variance: float = Field( description="Variance" ) min: int = Field( description="Minimum value" ) max: int = Field( description="Maximum value" ) count: int = Field( description="Number of data points" ) sum: int = Field( description="Sum of all values" ) range: int = Field( description="Range (max - min)" ) class DatasetInfo(BaseModel): """ Information about a saved dataset. Provides metadata about dataset files. """ filename: str = Field( description="Name of the dataset file" ) filepath: str = Field( description="Absolute path to file" ) size_bytes: int = Field( description="File size in bytes" ) created_at: str = Field( description="Creation timestamp" ) count: Optional[int] = Field( default=None, description="Number of values in dataset (if known)" ) class ErrorResponse(BaseModel): """ Standardized error response. Used for consistent error reporting across tools. """ error: str = Field( description="Error message" ) error_type: str = Field( description="Type of error (e.g., ValidationError, IOError)" ) details: Optional[str] = Field( default=None, description="Additional error details" )

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/sengokusal2025/f0_20251002'

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