Skip to main content
Glama

get_view

Capture a screenshot of the active view in FreeCAD by specifying the desired orientation, such as Isometric, Front, Top, or other predefined views. Ideal for documenting or analyzing 3D designs.

Instructions

Get a screenshot of the active view.

Args: view_name: The name of the view to get the screenshot of. The following views are available: - "Isometric" - "Front" - "Top" - "Right" - "Back" - "Left" - "Bottom" - "Dimetric" - "Trimetric" Returns: A screenshot of the active view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_nameYes

Implementation Reference

  • The main handler function for the 'get_view' MCP tool. It is decorated with @mcp.tool(), which handles both the schema (input/output types and docstring) and registration. The function connects to FreeCAD, sets the view, captures a screenshot, and returns it as ImageContent or an error message.
    @mcp.tool() def get_view(ctx: Context, view_name: Literal["Isometric", "Front", "Top", "Right", "Back", "Left", "Bottom", "Dimetric", "Trimetric"]) -> list[ImageContent | TextContent]: """Get a screenshot of the active view. Args: view_name: The name of the view to get the screenshot of. The following views are available: - "Isometric" - "Front" - "Top" - "Right" - "Back" - "Left" - "Bottom" - "Dimetric" - "Trimetric" Returns: A screenshot of the active view. """ freecad = get_freecad_connection() screenshot = freecad.get_active_screenshot(view_name) if screenshot is not None: return [ImageContent(type="image", data=screenshot, mimeType="image/png")] else: return [TextContent(type="text", text="Cannot get screenshot in the current view type (such as TechDraw or Spreadsheet)")]

Other Tools

Related Tools

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/neka-nat/freecad-mcp'

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