Skip to main content
Glama
andreahaku
by andreahaku

expo.logs.tail

Retrieve recent Expo/Metro development logs to monitor application behavior and debug issues during iOS development.

Instructions

Get recent Expo/Metro logs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNoNumber of log lines to return.

Implementation Reference

  • MCP tool registration and handler for 'expo.logs.tail'. Calls getExpoLogsTail(args.lines) from expo module and returns formatted JSON response, with error handling.
    server.tool( "expo.logs.tail", "Get recent Expo/Metro logs", ExpoLogsTailInputSchema.shape, async (args) => { try { const logs = getExpoLogsTail(args.lines); return { content: [ { type: "text", text: JSON.stringify(logs, null, 2), }, ], }; } catch (error) { return handleToolError(error); } } );
  • Zod input schema for the expo.logs.tail tool, defining optional 'lines' parameter defaulting to 100.
    export const ExpoLogsTailInputSchema = z.object({ lines: z.number().optional().default(100).describe("Number of log lines to return."), });
  • Helper function getExpoLogsTail that wraps and delegates to getExpoLogs for retrieving Expo logs.
    export function getExpoLogsTail(lines: number = 100) { return getExpoLogs(lines); }
  • Core helper function getExpoLogs that retrieves the last N lines from the 'expo' logger category using logger.tail.
    export function getExpoLogs(lines: number = 100): LogEntry[] { return logger.tail("expo", lines); }

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/andreahaku/expo_ios_development_mcp'

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