Skip to main content
Glama
saidsurucu

YOKATLAS API MCP Server

by saidsurucu

search_associate_degree_programs

Find associate degree programs in Turkey using smart search with fuzzy matching for universities, partial matching for program names, and filters for city, university type, fee status, and education type.

Instructions

Search for associate degree (önlisans) programs with smart fuzzy matching and user-friendly parameters.

Smart Features:

  • Fuzzy university name matching (e.g., "anadolu" → "ANADOLU ÜNİVERSİTESİ")

  • Partial program name matching (e.g., "turizm" finds all tourism programs)

  • Intelligent parameter normalization

  • Type-safe validation

Parameters:

  • university: University name (fuzzy matching supported)

  • program: Program/department name (partial matching supported)

  • city: City name

  • university_type: Type of university (Devlet, Vakıf, etc.)

  • fee_type: Fee/scholarship information

  • education_type: Type of education (Örgün, İkinci, etc.)

  • results_limit: Maximum number of results to return

Note: Associate degree programs use TYT scores, not SAY/EA/SOZ/DIL like bachelor programs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
universityNoUniversity name with fuzzy matching support (e.g., 'anadolu' → 'ANADOLU ÜNİVERSİTESİ')
programNoProgram name with partial matching (e.g., 'turizm' finds all tourism programs)
cityNoCity name where the university is located
university_typeNoUniversity type: Devlet (State), Vakıf (Foundation), KKTC (TRNC), Yurt Dışı (International)
fee_typeNoFee status: Ücretsiz (Free), Ücretli (Paid), İÖ-Ücretli (Evening-Paid), Burslu (Scholarship), İndirimli (Discounted), AÖ-Ücretli (Open Education-Paid), UÖ-Ücretli (Distance Learning-Paid)
education_typeNoEducation type: Örgün (Regular), İkinci (Evening), Açıköğretim (Open Education), Uzaktan (Distance Learning)
availabilityNoProgram availability: Doldu (Filled), Doldu# (Filled with conditions), Dolmadı (Not filled), Yeni (New program)
results_limitNoMaximum number of results to return
yop_koduNo
uni_adiNo
program_adiNo
sehir_adiNo
universite_turuNo
ucret_bursNo
ogretim_turuNo
dolulukNo
ust_puanNo
alt_puanNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'search_associate_degree_programs' tool. Decorated with @mcp.tool() for automatic registration in FastMCP. Implements fuzzy university/program name matching, parameter normalization, calls to yokatlas_py search functions (search_onlisans_programs or legacy), result validation with ProgramInfo, and error handling.
    @mcp.tool()
    def search_associate_degree_programs(
        # User-friendly parameters with fuzzy matching
        university: Annotated[str, Field(description="University name with fuzzy matching support (e.g., 'anadolu' → 'ANADOLU ÜNİVERSİTESİ')")] = '',
        program: Annotated[str, Field(description="Program name with partial matching (e.g., 'turizm' finds all tourism programs)")] = '',
        city: Annotated[str, Field(description="City name where the university is located")] = '',
        university_type: Annotated[Optional[Literal['Devlet', 'Vakıf', 'KKTC', 'Yurt Dışı']], Field(description="University type: Devlet (State), Vakıf (Foundation), KKTC (TRNC), Yurt Dışı (International)")] = None,
        fee_type: Annotated[Optional[Literal['Ücretsiz', 'Ücretli', 'İÖ-Ücretli', 'Burslu', '%50 İndirimli', '%25 İndirimli', 'AÖ-Ücretli', 'UÖ-Ücretli']], Field(description="Fee status: Ücretsiz (Free), Ücretli (Paid), İÖ-Ücretli (Evening-Paid), Burslu (Scholarship), İndirimli (Discounted), AÖ-Ücretli (Open Education-Paid), UÖ-Ücretli (Distance Learning-Paid)")] = None,
        education_type: Annotated[Optional[Literal[ 'Örgün', 'İkinci', 'Açıköğretim', 'Uzaktan']], Field(description="Education type: Örgün (Regular), İkinci (Evening), Açıköğretim (Open Education), Uzaktan (Distance Learning)")] = None,
        availability: Annotated[Optional[Literal['Doldu', 'Doldu#', 'Dolmadı', 'Yeni']], Field(description="Program availability: Doldu (Filled), Doldu# (Filled with conditions), Dolmadı (Not filled), Yeni (New program)")] = None,
        results_limit: Annotated[int, Field(description="Maximum number of results to return", ge=1, le=500)] = 50,
        # Legacy parameter support for backward compatibility
        yop_kodu: str = '',
        uni_adi: str = '',
        program_adi: str = '',
        sehir_adi: str = '',
        universite_turu: str = '',
        ucret_burs: str = '',
        ogretim_turu: str = '',
        doluluk: str = '',
        ust_puan: float = 550.0,
        alt_puan: float = 150.0,
        page: int = 1
    ) -> dict:
        """
        Search for associate degree (önlisans) programs with smart fuzzy matching and user-friendly parameters.
    
        Smart Features:
        - Fuzzy university name matching (e.g., "anadolu" → "ANADOLU ÜNİVERSİTESİ")
        - Partial program name matching (e.g., "turizm" finds all tourism programs)
        - Intelligent parameter normalization
        - Type-safe validation
    
        Parameters:
        - university: University name (fuzzy matching supported)
        - program: Program/department name (partial matching supported)
        - city: City name
        - university_type: Type of university (Devlet, Vakıf, etc.)
        - fee_type: Fee/scholarship information
        - education_type: Type of education (Örgün, İkinci, etc.)
        - results_limit: Maximum number of results to return
    
        Note: Associate degree programs use TYT scores, not SAY/EA/SOZ/DIL like bachelor programs.
        """
        try:
            if NEW_SMART_API:
                # Use new smart search functions (v0.4.3+)
                search_params = {}
    
                # Map user-friendly parameters to API parameters
                if university or uni_adi:
                    search_params['uni_adi'] = university or uni_adi
                if program or program_adi:
                    search_params['program_adi'] = program or program_adi
                if city or sehir_adi:
                    search_params['city'] = city or sehir_adi
                if university_type or universite_turu:
                    search_params['university_type'] = university_type or universite_turu
                if fee_type or ucret_burs:
                    search_params['fee_type'] = fee_type or ucret_burs
                if education_type or ogretim_turu:
                    search_params['education_type'] = education_type or ogretim_turu
                if results_limit:
                    search_params['length'] = results_limit
    
                # Use smart search with fuzzy matching
                results = search_onlisans_programs(search_params, smart_search=True)
    
                # Format results consistently
                return {
                    "programs": results,
                    "total_found": len(results),
                    "search_method": "smart_search_v0.4.3",
                    "fuzzy_matching": True,
                    "program_type": "associate_degree"
                }
    
            else:
                # Fallback to legacy API
                params = {
                    'yop_kodu': yop_kodu,
                    'uni_adi': university or uni_adi,
                    'program_adi': program or program_adi,
                    'sehir_adi': city or sehir_adi,
                    'universite_turu': university_type or universite_turu,
                    'ucret_burs': fee_type or ucret_burs,
                    'ogretim_turu': education_type or ogretim_turu,
                    'doluluk': doluluk,
                    'ust_puan': ust_puan,
                    'alt_puan': alt_puan,
                    'page': page
                }
    
                # Remove empty parameters
                params = {k: v for k, v in params.items() if v or isinstance(v, (int, float))}
    
                onlisans_tercih = YOKATLASOnlisansTercihSihirbazi(params)
                result = onlisans_tercih.search()
    
                return {
                    "programs": result[:results_limit] if isinstance(result, list) else result,
                    "total_found": len(result) if isinstance(result, list) else 0,
                    "search_method": "legacy_api",
                    "fuzzy_matching": False,
                    "program_type": "associate_degree"
                }
    
        except Exception as e:
            print(f"Error in search_associate_degree_programs: {e}")
            return {
                "error": str(e),
                "search_method": "smart_search" if NEW_SMART_API else "legacy_api",
                "parameters_used": {
                    "university": university or uni_adi,
                    "program": program or program_adi,
                    "city": city or sehir_adi
                },
                "program_type": "associate_degree"
            }
  • Input schema defined using Pydantic's Annotated and Field for type validation, descriptions, and constraints (e.g., Literals for enums, ge/le for limits). Supports both modern user-friendly params and legacy params for backward compatibility.
        # User-friendly parameters with fuzzy matching
        university: Annotated[str, Field(description="University name with fuzzy matching support (e.g., 'anadolu' → 'ANADOLU ÜNİVERSİTESİ')")] = '',
        program: Annotated[str, Field(description="Program name with partial matching (e.g., 'turizm' finds all tourism programs)")] = '',
        city: Annotated[str, Field(description="City name where the university is located")] = '',
        university_type: Annotated[Optional[Literal['Devlet', 'Vakıf', 'KKTC', 'Yurt Dışı']], Field(description="University type: Devlet (State), Vakıf (Foundation), KKTC (TRNC), Yurt Dışı (International)")] = None,
        fee_type: Annotated[Optional[Literal['Ücretsiz', 'Ücretli', 'İÖ-Ücretli', 'Burslu', '%50 İndirimli', '%25 İndirimli', 'AÖ-Ücretli', 'UÖ-Ücretli']], Field(description="Fee status: Ücretsiz (Free), Ücretli (Paid), İÖ-Ücretli (Evening-Paid), Burslu (Scholarship), İndirimli (Discounted), AÖ-Ücretli (Open Education-Paid), UÖ-Ücretli (Distance Learning-Paid)")] = None,
        education_type: Annotated[Optional[Literal[ 'Örgün', 'İkinci', 'Açıköğretim', 'Uzaktan']], Field(description="Education type: Örgün (Regular), İkinci (Evening), Açıköğretim (Open Education), Uzaktan (Distance Learning)")] = None,
        availability: Annotated[Optional[Literal['Doldu', 'Doldu#', 'Dolmadı', 'Yeni']], Field(description="Program availability: Doldu (Filled), Doldu# (Filled with conditions), Dolmadı (Not filled), Yeni (New program)")] = None,
        results_limit: Annotated[int, Field(description="Maximum number of results to return", ge=1, le=500)] = 50,
        # Legacy parameter support for backward compatibility
        yop_kodu: str = '',
        uni_adi: str = '',
        program_adi: str = '',
        sehir_adi: str = '',
        universite_turu: str = '',
        ucret_burs: str = '',
        ogretim_turu: str = '',
        doluluk: str = '',
        ust_puan: float = 550.0,
        alt_puan: float = 150.0,
        page: int = 1
    ) -> dict:
  • Tool registration via FastMCP's @mcp.tool() decorator, which automatically registers the function as an MCP tool with the defined schema from parameters.
    @mcp.tool()
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes smart features like fuzzy matching, partial matching, normalization, and validation, which are useful behavioral traits. However, it doesn't mention performance characteristics (e.g., rate limits), error handling, or what the output looks like (though an output schema exists). It adequately covers search behavior but lacks broader operational context.

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

Conciseness4/5

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

The description is well-structured with sections for smart features, parameters, and a note, making it easy to scan. It's appropriately sized for a complex tool with 19 parameters. However, some redundancy exists (e.g., parameter explanations partially repeat schema descriptions), and the note about TYT scores could be more integrated.

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?

Given the complexity (19 parameters, low schema coverage, no annotations) and the presence of an output schema, the description is reasonably complete. It explains the tool's purpose, key parameters, and smart features, and the output schema handles return values. However, it doesn't fully address all parameters or provide usage examples, leaving some gaps for such a parameter-rich tool.

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?

Schema description coverage is 42% (low), but the description compensates by listing and briefly explaining 7 key parameters (university, program, city, university_type, fee_type, education_type, results_limit) with examples. It adds meaning beyond the schema by grouping them and noting smart features like fuzzy/partial matching. However, it doesn't cover all 19 parameters, leaving some undocumented (e.g., yop_kodu, ust_puan).

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 clearly states the tool's purpose: 'Search for associate degree (önlisans) programs with smart fuzzy matching and user-friendly parameters.' It specifies the verb ('search'), resource ('associate degree programs'), and distinguishes from siblings by focusing on associate degrees versus bachelor degrees in sibling tools like 'search_bachelor_degree_programs'.

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?

The description provides clear context for when to use this tool: for searching associate degree programs, with a note that they use TYT scores, not SAY/EA/SOZ/DIL like bachelor programs. This implicitly distinguishes it from 'search_bachelor_degree_programs', but it doesn't explicitly state when not to use it or mention alternatives like 'get_associate_degree_atlas_details' for detailed information.

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

Install Server

Other 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/saidsurucu/yokatlas-mcp'

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