Module: Mathpix
- Defined in:
- lib/mathpix.rb,
lib/mathpix/client.rb,
lib/mathpix/errors.rb,
lib/mathpix/result.rb,
lib/mathpix/version.rb,
lib/mathpix/document.rb,
lib/mathpix/mcp/server.rb,
lib/mathpix/mcp/http_app.rb,
lib/mathpix/configuration.rb,
lib/mathpix/mcp/base_tool.rb,
lib/mathpix/mcp/tools/get_usage_tool.rb,
lib/mathpix/mcp/tools/list_formats_tool.rb,
lib/mathpix/mcp/tools/batch_convert_tool.rb,
lib/mathpix/mcp/tools/convert_image_tool.rb,
lib/mathpix/mcp/tools/search_results_tool.rb,
lib/mathpix/mcp/tools/convert_strokes_tool.rb,
lib/mathpix/mcp/tools/convert_document_tool.rb,
lib/mathpix/mcp/tools/get_account_info_tool.rb,
lib/mathpix/mcp/tools/check_document_status_tool.rb
Overview
Mathpix OCR engine for the MCP server.
- The classes under Mathpix
are the engine the MCP tools delegate to
(see lib/mathpix/mcp). Only configuration and the shared client instance are exposed at the top level — there is no general-purpose client API.
Defined Under Namespace
Modules: MCP Classes: APIError, Client, Configuration, ConfigurationError, ConversionError, Document, DocumentConversion, DocumentResult, Error, InvalidImageError, InvalidRequestError, LowConfidenceError, NetworkError, RateLimitError, Result, ServerError, TimeoutError
Constant Summary collapse
- VERSION =
'1.0.0'- PDF =
Alias PDF class to Document for backward compatibility
Document- PDFResult =
DocumentResult
Class Method Summary collapse
-
.client ⇒ Client
Shared client instance used by the MCP tools.
-
.configuration ⇒ Configuration
Current configuration.
-
.configure {|Configuration| ... } ⇒ Object
Configure the Mathpix client.
-
.reset! ⇒ Object
Reset configuration and client (mainly for tests).
Class Method Details
.client ⇒ Client
Shared client instance used by the MCP tools.
42 43 44 |
# File 'lib/mathpix.rb', line 42 def client @client ||= Client.new(configuration) end |
.configuration ⇒ Configuration
Current configuration.
36 37 38 |
# File 'lib/mathpix.rb', line 36 def configuration @configuration ||= Configuration.new end |
.configure {|Configuration| ... } ⇒ Object
Configure the Mathpix client.
30 31 32 |
# File 'lib/mathpix.rb', line 30 def configure yield configuration end |
.reset! ⇒ Object
Reset configuration and client (mainly for tests).
47 48 49 50 |
# File 'lib/mathpix.rb', line 47 def reset! @configuration = Configuration.new @client = nil end |