stop_sim_log_cap
Stops an active simulator log capture session in XcodeBuildMCP, retrieves and returns the captured logs for analysis, using the specified log session ID.
Instructions
Stops an active simulator log capture session and returns the captured logs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logSessionId | Yes | The session ID returned by start_sim_log_cap. |
Implementation Reference
- The handler function that executes the tool logic: stops the log capture session and returns the captured logs or an error response.export async function stop_sim_log_capLogic(params: StopSimLogCapParams): Promise<ToolResponse> { const { logContent, error } = await _stopLogCapture(params.logSessionId); if (error) { return { content: [ createTextContent(`Error stopping log capture session ${params.logSessionId}: ${error}`), ], isError: true, }; } return { content: [ createTextContent( `Log capture session ${params.logSessionId} stopped successfully. Log content follows:\n\n${logContent}`, ), ], }; }
- Zod schema defining the input parameters for the tool (logSessionId).const stopSimLogCapSchema = z.object({ logSessionId: z.string().describe('The session ID returned by start_sim_log_cap.'), });
- src/mcp/tools/logging/stop_sim_log_cap.ts:43-48 (registration)Default export of the tool object including name, description, schema, and handler for MCP registration.export default { name: 'stop_sim_log_cap', description: 'Stops an active simulator log capture session and returns the captured logs.', schema: stopSimLogCapSchema.shape, // MCP SDK compatibility handler: createTypedTool(stopSimLogCapSchema, stop_sim_log_capLogic, getDefaultCommandExecutor), };