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
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of log lines to return. |
Implementation Reference
- src/mcp/server.ts:339-358 (handler)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); } } );
- src/mcp/schemas.ts:41-43 (schema)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."), });
- src/expo/expo.ts:227-229 (helper)Helper function getExpoLogsTail that wraps and delegates to getExpoLogs for retrieving Expo logs.export function getExpoLogsTail(lines: number = 100) { return getExpoLogs(lines); }
- src/expo/logs.ts:91-93 (helper)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); }