Skip to main content
Glama

Yowes — Công Cụ Tạo Tài Liệu Canva Education

MCP server chạy ngầm (headless) giúp tạo giấy tờ xác minh giáo viên — thư xác nhận công tác, thẻ giáo viên, giấy phép giảng dạy, phiếu lương và nhiều loại khác — cho 13 quốc gia.

License: MIT Python MCP Platform

Nhỏ gọn, độc lập, cài đặt ở đâu cũng chạy.


Mục Lục


Related MCP server: mcp_server

Ảnh mẫu

Tài liệu được xuất ra file ảnh PNG chất lượng cao. Ví dụ do công cụ này tạo:

Thẻ giáo viên (Mỹ)

Thư xác nhận công tác (Mỹ)

Thẻ giáo viên Mỹ

Thư Mỹ

Thẻ giáo viên (Anh)

Thư xác nhận công tác (Anh)

Thẻ giáo viên Anh

Thư Anh


Tính năng

  • MCP server chạy ngầm — tạo tài liệu thông qua tool gọi được từ AI agent qua stdio.

  • 13 quốc gia, mỗi nước có loại giấy tờ và quy cách riêng theo thực tế.

  • Dữ liệu trường học thật gồm tên trường, địa chỉ, quận/huyện, số điện thoại.

  • Ảnh chân dung nhất quán theo từng người — chọn ảnh theo hash, phân biệt nam/nữ.

  • Font chữ đi kèm — dùng DejaVu Sans có sẵn, không phụ thuộc font hệ thống.

  • Đóng gói gọn nhẹ — xuất ra file wheel tự chứa (code + ảnh + font), cài bằng 1 lệnh.


Các quốc gia hỗ trợ

Mã

Quốc gia

Các loại giấy tờ

uk

Anh (United Kingdom)

employment_letter, teacher_id, teaching_license

us

Mỹ (United States)

employment_letter, teacher_id, teaching_license

france

Pháp (France)

installation_statement, iprof_screenshot, bylaws_extract, teaching_certificate

netherlands

Hà Lan (Netherlands)

employment_contract, teacher_registration, duo_declaration, school_id

indonesia

Indonesia

payslip, teaching_experience_letter, nuptk_card, appointment_letter

australia

Úc (Australia)

signed_school_letter, school_id, teaching_license

canada

Canada

oct_card, teaching_license, signed_school_letter

spain

Tây Ban Nha (Spain)

teaching_id, signed_school_letter, employment_contract

argentina

Argentina

payslip, employment_certificate, signed_school_letter

slovakia

Slovakia

payslip, employment_letter, signed_school_letter

mexico

Mexico

teaching_id, signed_school_letter, employment_certificate

philippines

Philippines

teaching_id, employment_certificate, teaching_license

thailand

Thái Lan (Thailand)

payslip, letter_of_employment


Yêu cầu

  • Python 3.10 trở lên

  • Thư viện tự cài kèm theo: Pillow, mcp


Cài đặt

Cài từ file wheel build sẵn

pip install dist/yowes_doc_generator-0.1.0-py3-none-any.whl

Cài từ source (chế độ sửa code trực tiếp)

pip install -e .

Cài qua uv

uvx --from . yowes-mcp

Cách dùng — MCP server

Server giao tiếp qua MCP chuẩn stdio — kiểu kết nối mà hầu hết agent/AI app dùng (Hermes, Claude Desktop và các MCP client khác). Bạn kết nối vào, xem danh sách tool rồi gọi thôi.

Bước 1 — Cài đặt & kiểm tra

# cài từ file wheel
pip install dist/yowes_doc_generator-0.1.0-py3-none-any.whl

# hoặc cài từ source
pip install -e .

Kiểm tra cài đặt thành công và tài nguyên đi kèm (font, ảnh) đã nhận:

python -c "from countries.utils import load_font, get_profile_photo; \
print(load_font(30).getname()); print(get_profile_photo((280,340), person_id='x', gender='Male') is not None)"
# ('DejaVu Sans', 'Book')   <-- font đi kèm, không phải font hệ thống
# True                      <-- đã tìm thấy ảnh đi kèm

Bước 2 — Chạy server

# Sau khi cài:
yowes-mcp

# Hoặc chạy từ source:
python mcp_server.py

Lệnh này sẽ đứng chờ request MCP qua stdin/stdout — đừng chạy rồi ngồi đợi nó hiện prompt gì nhé.

Bước 3 — Khai báo vào agent / app của bạn

Trỏ MCP client tới lệnh yowes-mcp:

{
  "mcpServers": {
    "yowes": {
      "command": "yowes-mcp",
      "args": []
    }
  }
}

Nếu yowes-mcp không có trong PATH, dùng đường dẫn tuyệt đối tới python và module:

{
  "mcpServers": {
    "yowes": {
      "command": "/path/to/python",
      "args": ["-m", "mcp_server"]
    }
  }
}

Danh sách tool

Tool

Mô tả

list_countries_tool

Liệt kê các quốc gia, tên hiển thị và loại giấy tờ của từng nước.

list_schools(country)

Liệt kê toàn bộ trường học của 1 quốc gia theo mã nước.

generate_documents(...)

Tạo 1 hoặc nhiều giấy tờ ra file PNG, trả về đường dẫn file.

list_countries_tool()

Không cần tham số. Trả về mỗi quốc gia 1 mục — { code, name, document_types }. (Vì kiểu trả về list sẽ tách thành nhiều content item, bạn duyệt từng content để xem hết.)

list_schools(country: str)

  • country (bắt buộc) — mã quốc gia lấy từ list_countries_tool (ví dụ "us").

  • Trả về mỗi trường 1 mục — { name, address, town, postcode, state, phone, lea }. Duyệt content để xem hết.

generate_documents(...)

Tham số

Kiểu

Bắt buộc

Mặc định

Mô tả

country

string

✅

—

Mã quốc gia (ví dụ "us", "uk").

first_name

string

✅

—

Tên của giáo viên.

last_name

string

✅

—

Họ của giáo viên.

school_name

string

✅

—

Tên trường (đúng hoặc gần đúng, sẽ tự khớp với danh sách trường của nước đó).

position

string

✅

—

Chức vụ / vị trí giảng dạy.

date_of_birth

string

✅

—

Ngày sinh, in lên thẻ giáo viên (ví dụ "12/05/1988").

gender

string

—

"Random"

"Random", "Male" hoặc "Female" — chọn kho ảnh chân dung.

document_types

string[]

—

tất cả

Chọn loại giấy tờ muốn tạo, ví dụ ["employment_letter", "teacher_id"].

output_dir

string

—

output/

Thư mục lưu file PNG (tính từ thư mục chạy server).

Trả về { country, school, document_types, files, count, output_dir } — files là đường dẫn tuyệt đối tới các file PNG.

Kết nối từ code Python

Code client tối thiểu (cần pip install mcp):

import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client

async def main():
    params = StdioServerParameters(command="yowes-mcp", args=[])
    async with stdio_client(params) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            countries = await session.call_tool("list_countries_tool", {})
            # Kết quả list được tách thành nhiều content item:
            for item in countries.content:
                print(item.text)

            res = await session.call_tool("generate_documents", {
                "country": "us",
                "first_name": "John",
                "last_name": "Smith",
                "school_name": "Valley High",
                "position": "Head of Science Department",
                "date_of_birth": "12/05/1988",
                "gender": "Male",
            })
            print(res.content[0].text)

asyncio.run(main())

Quy trình mẫu cho agent

  1. Gọi list_countries_tool để xem có những nước nào.

  2. Gọi list_schools("us") để chọn trường thật.

  3. Gọi generate_documents(...) với thông tin quốc gia, trường, tên người.

  4. Lấy đường dẫn PNG trả về để dùng file.

File PNG tạo ra nằm trong output/ (hoặc thư mục output_dir bạn truyền vào).


Giao diện GUI cũ

Vẫn còn bản giao diện tkinter (CustomTkinter) để dùng tay. Phần lõi sinh tài liệu dùng chung.

python main_gui.py        # trên Windows dùng run.bat (đã set sẵn TCL_LIBRARY)

MCP server mới là giao diện chính, chạy ngầm. GUI chỉ là tùy chọn, không bắt buộc.


Cấu trúc thư mục

yowes/
├── countries/            # Lõi sinh tài liệu (package)
│   ├── base.py           # Class cha CountryGenerator (hợp đồng chung)
│   ├── utils.py          # Font, ảnh chân dung, hàm dùng chung
│   ├── foto/             # Ảnh chân dung đi kèm (package data)
│   ├── fonts/            # Font DejaVu đi kèm (package data)
│   └── <country>/        # Mỗi quốc gia 1 package riêng
├── mcp_server.py         # MCP server chứa các tool
├── main_gui.py           # GUI tkinter bản cũ
├── docs/examples/        # Ảnh tài liệu mẫu đã tạo
├── pyproject.toml        # Đóng gói, thư viện, entry point
├── output/               # Tài liệu tạo ra (không commit lên git)
└── run.bat               # File chạy GUI trên Windows

Thêm quốc gia mới

  1. Tạo countries/<mã_nước>/__init__.py với class kế thừa countries.base.CountryGenerator.

  2. Viết các hàm bắt buộc: get_country_name, get_country_code, get_schools_data, get_first_names, get_last_names, get_positions, get_document_types, generate_document.

  3. Đăng ký vào countries/__init__.py bằng register_country("<mã_nước>", <Tên>Generator).

  4. (Tùy chọn) Thêm tên hiển thị trong main_gui.py (get_country_list / on_country_change).

Quốc gia mới sẽ tự hiện trong tool MCP list_countries_tool và list_schools.


Người đóng góp


Giấy phép

MIT © 2026 quyen2867

Available Tools

3 tools
generate_documentsA

Generate teacher verification documents (employment letter, teacher ID, teaching license).

Args: country: Country code from list_countries (e.g. 'us', 'uk'). first_name / last_name: The teacher's name. school_name: Exact or partial school name (matched against that country's school list). position: Teaching position/title. date_of_birth: Display date of birth string (shown on the teacher ID). gender: 'Random', 'Male', or 'Female' — selects which photo pool is used. document_types: Which documents to render. Omit for all. e.g. ['employment_letter', 'teacher_id']. output_dir: Where to save PNGs (relative to project root). Defaults to 'output'.

Returns: Dict with 'files' (absolute paths), 'count', and 'output_dir'.

ParametersJSON Schema
NameRequiredDescriptionDefault
genderNoRandom
countryYes
positionYes
last_nameYes
first_nameYes
output_dirNo
school_nameYes
date_of_birthYes
document_typesNo

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does well: it states that PNGs are saved, output_dir is relative to project root, gender selects a photo pool, and the return value is a dict with files/count/output_dir. Minor gaps remain around overwrite behavior and directory creation, but the key behavioral profile is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is organized into a one-line summary followed by a clean Args list and a Returns line. Every sentence contributes necessary behavior or parameter information; there is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter tool with no annotations and no output schema, the description is remarkably complete: it covers every parameter, the output format, the file type, defaults, and the relationship to sibling list tools. An agent has enough information to call the tool correctly with minimal risk.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so every parameter must be explained in the description, and it is: country is tied to list_countries, school_name is matched against a school list, date_of_birth appears on the teacher ID, gender selects photo pools, and document_types can be omitted for all. It even adds defaults beyond the schema, such as output_dir defaulting to 'output'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Generate teacher verification documents' and lists the three concrete document types (employment letter, teacher ID, teaching license). It also references sibling tools by name ('list_countries', 'school list'), so an agent can distinguish this generation tool from the list/helper tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear usage context: country codes should come from list_countries, school_name is matched against the country's school list, and document_types can be omitted for all. It does not explicitly say when not to use the tool, but the prerequisites and relationship to the sibling data-lookup tools are clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_countries_toolA

List all available countries, their display names, and the document types each can generate.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the burden of explaining behavior. It clearly states the returned data (countries, display names, document types) and 'List' implies a read-only operation, though it does not explicitly state side effects or limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence with no filler; the core action and output are front-loaded and every clause adds information. It is appropriately minimal and well structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, has no parameters, and has an output schema, so the description provides sufficient information for an agent to invoke it. It could mention how this list relates to generate_documents (e.g., as a prerequisite), but that is not essential to making the call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so no parameter guidance is needed; the description and empty schema align perfectly. Baseline 4 for zero-parameter tools is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('all available countries') and specifies exactly what the output includes (display names and document types). This makes the tool's purpose immediately clear and distinguishes it from siblings like list_schools (different resource) and generate_documents (different action).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit statement of when to use this tool versus list_schools or generate_documents. The intended use is implied by the name and description, but the description does not name alternatives or provide exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_schoolsA

List all schools for a given country code (e.g. 'us', 'uk'). Each entry has name/address/town/postcode/state/phone/lea.

ParametersJSON Schema
NameRequiredDescriptionDefault
countryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the behavioral burden. It clearly conveys a read-only listing operation and describes entry fields, but it does not address invalid country codes, case sensitivity, or pagination behavior. Adequate for a simple list, but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The action and required input are front-loaded, and the output entry shape is summarized in a compact, useful way.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with an output schema, the description is nearly complete: it specifies what the tool does, what input is expected, and what each output entry contains. Missing behavior for invalid or unknown country codes is a minor gap given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only provides a bare 'country' string with 0% coverage, so the description must add meaning. It does so by clarifying the value should be a country code ('us', 'uk') rather than a full country name. It could specify allowed formats more precisely, but the guidance is meaningful.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action ('List all schools') and resource (schools) with a clear input condition (country code) and example values. It is obviously distinct from siblings list_countries_tool and generate_documents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool: provide a country code to get schools. However, it does not explicitly mention alternatives, such as using list_countries_tool to discover valid codes, or state when this tool should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedgenerate_documents
    • First observedlist_countries_tool
    • First observedlist_schools

TDQS

A4.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a distinct step in the workflow: country discovery, school lookup, and document generation. There is no overlap in purpose or input/output that would cause misselection.

Naming Consistency4/5

Two tools follow verb_noun snake_case, but list_countries_tool adds a redundant '_tool' suffix. This minor deviation is the only inconsistency in an otherwise predictable pattern.

Tool Count5/5

Three tools are exactly sufficient for the service: discover countries, find schools, and generate documents. No tool feels redundant or missing within this minimal workflow.

Completeness5/5

The surface covers the full generation lifecycle from country/document-type discovery through school lookup to document creation. No obvious gaps prevent an agent from completing the core task.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to generate teaching materials such as PPTs, handouts, lecture scripts, mind maps, teaching video storyboards, and Manim math animations, plus run quality checks and language normalization through 15 MCP tools.
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to access document processing tools for extracting text, generating summaries, and identifying skills via MCP.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Enables generating realistic teacher verification documents such as employment letters, teacher ID cards, teaching licenses, and payslips across 13 countries via MCP.
    36
    3
    178
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to retrieve and work with Moscow Electronic School data, including schedules, homework, grades, rankings, school info, meals, passes, olympiads, and portfolio, via authenticated MCP tools.
    MIT