Rocky_Mountain_Vending/.pnpm-store/v10/files/91/71377dafd0a3c4c7b18c4b48698623344a0e2525e63f5d3ed7acd0cb0c9404ddbc4939c6d90313af9f4c8a2cc208cf1e1a31ea1fa442aecda71ebfda2457fd
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

51 lines
No EOL
1.8 KiB
Text

/**
* MCP tool for getting the path to the Next.js development log file.
*
* This tool returns the path to the {nextConfig.distDir}/logs/next-development.log file
* that contains browser console logs and other development information.
*/ import { stat } from 'fs/promises';
import { join } from 'path';
import { mcpTelemetryTracker } from '../mcp-telemetry-tracker';
export function registerGetLogsTool(server, distDir) {
server.registerTool('get_logs', {
description: 'Get the path to the Next.js development log file. Returns the file path so the agent can read the logs directly.'
}, async ()=>{
// Track telemetry
mcpTelemetryTracker.recordToolCall('mcp/get_logs');
try {
const logFilePath = join(distDir, 'logs', 'next-development.log');
// Check if the log file exists
try {
await stat(logFilePath);
} catch (error) {
return {
content: [
{
type: 'text',
text: `Log file not found at ${logFilePath}.`
}
]
};
}
return {
content: [
{
type: 'text',
text: `Next.js log file path: ${logFilePath}`
}
]
};
} catch (error) {
return {
content: [
{
type: 'text',
text: `Error getting log file path: ${error instanceof Error ? error.message : String(error)}`
}
]
};
}
});
}
//# sourceMappingURL=get-logs.js.map