Skip to main content
Glama
product.proto2.93 kB
syntax = "proto3"; package api.v1; // Product catalog service service ProductService { // Create a new product rpc CreateProduct(CreateProductRequest) returns (CreateProductResponse); // Get product by ID rpc GetProduct(GetProductRequest) returns (GetProductResponse); // Search products by query rpc SearchProducts(SearchProductsRequest) returns (stream SearchProductsResponse); // Update product details rpc UpdateProduct(UpdateProductRequest) returns (UpdateProductResponse); } // Product represents a catalog item message Product { string id = 1; // Product ID string name = 2; // Product name string description = 3; // Product description double price = 4; // Price in USD string currency = 5; // Currency code (ISO 4217) ProductCategory category = 6; // Product category repeated string tags = 7; // Product tags int32 stock_quantity = 8; // Available stock ProductStatus status = 9; // Product status int64 created_at = 10; // Creation timestamp } // Product category enumeration enum ProductCategory { CATEGORY_UNSPECIFIED = 0; CATEGORY_ELECTRONICS = 1; CATEGORY_CLOTHING = 2; CATEGORY_BOOKS = 3; CATEGORY_HOME = 4; CATEGORY_SPORTS = 5; } // Product status enumeration enum ProductStatus { STATUS_UNSPECIFIED = 0; STATUS_ACTIVE = 1; // Available for purchase STATUS_INACTIVE = 2; // Not available STATUS_OUT_OF_STOCK = 3; // Temporarily unavailable STATUS_DISCONTINUED = 4; // No longer sold } // Request to create product message CreateProductRequest { string name = 1; string description = 2; double price = 3; ProductCategory category = 4; repeated string tags = 5; int32 stock_quantity = 6; } // Response with created product message CreateProductResponse { Product product = 1; } // Request to get product message GetProductRequest { string id = 1; } // Response with product message GetProductResponse { Product product = 1; } // Request to search products message SearchProductsRequest { string query = 1; // Search query optional ProductCategory category = 2; // Filter by category optional double min_price = 3; // Minimum price optional double max_price = 4; // Maximum price optional ProductStatus status = 5; // Filter by status int32 page_size = 6; // Results per page string page_token = 7; // Pagination token } // Response with search results message SearchProductsResponse { repeated Product products = 1; string next_page_token = 2; int32 total_count = 3; } // Request to update product message UpdateProductRequest { string id = 1; optional string name = 2; optional string description = 3; optional double price = 4; optional ProductCategory category = 5; repeated string tags = 6; optional int32 stock_quantity = 7; optional ProductStatus status = 8; } // Response with updated product message UpdateProductResponse { Product product = 1; }

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/umuterturk/mcp-proto'

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