get_project_deploy_status
Retrieve the deployment status of a project defined in .ploi.json configuration, enabling verification of current deployment state.
Instructions
Check deployment status for the current project using .ploi.json config
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | The path to the project directory containing .ploi.json |
Implementation Reference
- src/tools/sites.ts:262-289 (handler)The handler function for 'get_project_deploy_status' tool. Reads .ploi.json config, fetches the site status via client.getSite(), and returns the domain, status, server_id, and site_id as JSON.
async ({ project_path }) => { const config = await readPloiConfig(project_path); if (!config) { return { content: [ { type: "text" as const, text: `No .ploi.json config found in ${project_path}`, }, ], }; } const site = await client.getSite(config.server_id, config.site_id); return { content: [ { type: "text" as const, text: JSON.stringify({ domain: site.domain, status: site.status, server_id: config.server_id, site_id: config.site_id, }, null, 2), }, ], }; } - src/tools/sites.ts:259-261 (schema)The input schema for 'get_project_deploy_status'. Takes a single string parameter 'project_path' describing the path to the project directory containing .ploi.json.
{ project_path: z.string().describe("The path to the project directory containing .ploi.json"), }, - src/tools/sites.ts:256-290 (registration)The tool registration call using server.tool() with name 'get_project_deploy_status' and description 'Check deployment status for the current project using .ploi.json config'. Registered inside registerSiteTools() which is called from registerAllTools().
server.tool( "get_project_deploy_status", "Check deployment status for the current project using .ploi.json config", { project_path: z.string().describe("The path to the project directory containing .ploi.json"), }, async ({ project_path }) => { const config = await readPloiConfig(project_path); if (!config) { return { content: [ { type: "text" as const, text: `No .ploi.json config found in ${project_path}`, }, ], }; } const site = await client.getSite(config.server_id, config.site_id); return { content: [ { type: "text" as const, text: JSON.stringify({ domain: site.domain, status: site.status, server_id: config.server_id, site_id: config.site_id, }, null, 2), }, ], }; } ); - src/tools/sites.ts:12-24 (helper)Helper function readPloiConfig() that reads and parses .ploi.json from a project path, returning the server_id and site_id configuration or null on failure.
async function readPloiConfig(projectPath: string): Promise<PloiConfig | null> { try { const configPath = join(projectPath, ".ploi.json"); const content = await readFile(configPath, "utf-8"); const config = JSON.parse(content) as PloiConfig; if (typeof config.server_id === "number" && typeof config.site_id === "number") { return config; } return null; } catch { return null; } }