Skip to main content
Glama

Android Preference Editor MCP Server

utils.ts679 B
import { TypeTag } from "@charlesmuchene/pref-editor"; import { ZodType } from "zod"; export const parseDataType = (type: string): TypeTag => { const result = TypeTag[type.toUpperCase() as keyof typeof TypeTag]; if (result === undefined) throw new Error( `Invalid data type: '${type}'. Choose one of: integer, boolean, float, double, long or string` ); return result; }; export const validate = (input: unknown, type: ZodType) => { const validationResult = type.safeParse(input); if (!validationResult.success) throw new Error( `Invalid input: ${validationResult.error.errors .map((err) => err.message) .join(", ")}` ); };

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/charlesmuchene/pref-editor-mcp-server'

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