```python:inference/core/workflows/core_steps/models/foundation/glm_ocr/v1.py
from inference.core.workflows.execution_engine.entities.base import OutputDefinition
from inference.core.workflows.execution_engine.entities.types import STRING_KIND
from inference.core.workflows.prototypes.block import WorkflowBlockManifest
from typing import List

LONG_DESCRIPTION = """
Recognize text in images using GLM-OCR, a vision language model by Zhipu AI specialized
for optical character recognition.

GLM-OCR supports three built-in recognition modes controlled by the prompt:

- **Text Recognition** (`Text Recognition:`) — General-purpose text recognition for
  serial numbers, labels, scene text, and documents.
- **Formula Recognition** (`Formula Recognition:`) — Recognizes mathematical formulas
  and equations.
- **Table Recognition** (`Table Recognition:`) — Recognizes table structures and content.

You can also provide a custom prompt for specialized recognition tasks.

This block pairs well with detection models and DynamicCropBlock to isolate regions of
interest before running OCR. For example, use an object detection model to find labels
or text regions, crop them, then pass the crops to GLM-OCR.

Note: GLM-OCR requires a GPU for inference.
"""

_CACHED_OUTPUT_DEFINITIONS = [
    OutputDefinition(
        name="parsed_output",
        kind=[STRING_KIND],
        description="The recognized text from the image.",
    ),
]


class BlockManifest(WorkflowBlockManifest):
    @classmethod
    def describe_outputs(cls) -> List[OutputDefinition]:
        return _CACHED_OUTPUT_DEFINITIONS
```