Skip to content

fontlab_echopy.tooling.mcp

mcp

Build a fontpr merge overlay from the FontLab MCP specification.

fontpr is the embedded-Python face of FontLab's MCP server: every MCP tool is a module function that takes keyword arguments only. The specification (fontlab-mcp.json) gives each tool's description, input schema, effect, result shape, notes and examples. This module turns those into reference docstrings and keyword-only signature patches for tools that the captured generated/fontpr.py actually defines. Tools that exist on only one side are reported, never invented.

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
BLOCKED attribute
HELPER_PATCHES attribute dict[str, dict[str, str]]
INTEGER_NAMES attribute
JSON_TYPES attribute
MODULE_DOC attribute
REFERENCE_SOURCE attribute
build function (spec: dict[str, Any], captured: set[str]) -> tuple[dict[str, Any], dict[str, Any]] Return <code>(patches, report)</code> for tools defined in both sources.
captured_functions function (generated: Path) -> set[str]
example function (tool: dict[str, Any]) -> str First specification example rendered as a fontpr call.
module_doc function (spec: dict[str, Any]) -> str Module docstring: fixed calling convention plus targeting and rules.
param_type function (name: str, schema: dict[str, Any]) -> str Identifiers, counts, indices and page sizes (<code>font&#95;id</code><code>, </code><code>limit</code><code>, </code><code>min&#95;contour&#95;count</code>) are integers even where the schema says number.
parameter_lines function (tool: dict[str, Any]) -> list[str]
schema_type function (schema: dict[str, Any]) -> str Python annotation for a JSON-schema property.
signature function (tool: dict[str, Any]) -> str Keyword-only parameter list; required parameters come first.
tool_doc function (tool: dict[str, Any]) -> str
write function (mcp_json: Path, generated: Path, output: Path) -> dict[str, Any]