Skip to main content
Glama
saidsurucu

Mevzuat MCP

by saidsurucu

search_cbbaskankarar

Search Turkish Presidential Decisions by keywords in titles and content. Filter by date range and exact phrase matching.

Instructions

Search for Turkish Presidential Decisions (Cumhurbaşkanı Kararı) in both titles and content.

IMPORTANT: Search is keyword-based, NOT by decision number. Use descriptive Turkish terms. Presidential Decisions are executive decisions (different from Presidential Decrees/Kararnamesi). Note: Bakanlar Kurulu Kararı (BKK) is NOT a separate type - older BKKs may appear here or in Kanun.

Query Syntax: Simple keyword, AND, OR, NOT, +required, (grouping), "exact phrase"

Example queries:

  • "atama" - Find decisions about appointments

  • "ihracat AND rejim" - Export regime decisions

  • "vergi" or "gümrük" - Tax or customs decisions

  • Leave empty with dates to list all decisions from a period

Returns: Decision number, title, publication date, Official Gazette info. PDF format only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aranacak_ifadeNoSearch query with optional Boolean operators: simple word (organize), AND (organize AND suç), OR (suç OR ceza), NOT (organize NOT terör), + for required (+term), grouping with (), exact phrase with quotes ("organize suç"). Leave empty to list all decrees.
tam_cumleNoExact phrase match (true) or any word match (false, default). Set to true when searching for exact phrases.
baslangic_tarihiNoStart year for filtering results (format: YYYY, e.g., '2018')
bitis_tarihiNoEnd year for filtering results (format: YYYY, e.g., '2024')
page_numberNoPage number for pagination (starts at 1)
aranacak_yerNoWhere to search: 1=Title only, 2=Content only, 3=Both title and content (default)
page_sizeNoNumber of results per page (1-100)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentsYes
total_resultsYes
current_pageYes
page_sizeYes
total_pagesYes
query_usedYes
error_messageNo

Implementation Reference

  • Tool handler for 'search_cbbaskankarar' - searches Turkish Presidential Decisions (Cumhurbaşkanı Kararı) by keyword with Boolean operators, date filters, and pagination. Registered via @app.tool() decorator on FastMCP instance. Creates a MevzuatSearchRequestNew with mevzuat_tur='Cumhurbaşkanı Kararı' and delegates to mevzuat_client.search_documents().
    async def search_cbbaskankarar(
        aranacak_ifade: Optional[str] = Field(
            None,
            description='Search query with optional Boolean operators: simple word (organize), AND (organize AND suç), OR (suç OR ceza), NOT (organize NOT terör), + for required (+term), grouping with (), exact phrase with quotes ("organize suç"). Leave empty to list all decrees.'
        ),
        tam_cumle: bool = Field(
            False,
            description="Exact phrase match (true) or any word match (false, default). Set to true when searching for exact phrases."
        ),
        baslangic_tarihi: Optional[str] = Field(
            None,
            description="Start year for filtering results (format: YYYY, e.g., '2018')"
        ),
        bitis_tarihi: Optional[str] = Field(
            None,
            description="End year for filtering results (format: YYYY, e.g., '2024')"
        ),
        page_number: int = Field(
            1,
            ge=1,
            description="Page number for pagination (starts at 1)"
        ),
        aranacak_yer: int = Field(
            3,
            ge=1,
            le=3,
            description="Where to search: 1=Title only, 2=Content only, 3=Both title and content (default)"
        ),
        page_size: int = Field(
            25,
            ge=1,
            le=100,
            description="Number of results per page (1-100)"
        )
    ) -> MevzuatSearchResultNew:
        """
        Search for Turkish Presidential Decisions (Cumhurbaşkanı Kararı) in both titles and content.
    
        IMPORTANT: Search is keyword-based, NOT by decision number. Use descriptive Turkish terms.
        Presidential Decisions are executive decisions (different from Presidential Decrees/Kararnamesi).
        Note: Bakanlar Kurulu Kararı (BKK) is NOT a separate type - older BKKs may appear here or in Kanun.
    
        Query Syntax: Simple keyword, AND, OR, NOT, +required, (grouping), "exact phrase"
    
        Example queries:
        - "atama" - Find decisions about appointments
        - "ihracat AND rejim" - Export regime decisions
        - "vergi" or "gümrük" - Tax or customs decisions
        - Leave empty with dates to list all decisions from a period
    
        Returns: Decision number, title, publication date, Official Gazette info. PDF format only.
        """
        search_req = MevzuatSearchRequestNew(
            mevzuat_tur="Cumhurbaşkanı Kararı",
            aranacak_ifade=aranacak_ifade or "",
            aranacak_yer=aranacak_yer,
            tam_cumle=tam_cumle,
            mevzuat_no=None,
            baslangic_tarihi=baslangic_tarihi,
            bitis_tarihi=bitis_tarihi,
            page_number=page_number,
            page_size=page_size
        )
    
        log_params = search_req.model_dump(exclude_defaults=True)
        logger.info(f"Tool 'search_cbbaskankarar' called with parameters: {log_params}")
    
        try:
            result = await mevzuat_client.search_documents(search_req)
    
            if not result.documents and not result.error_message:
                result.error_message = "No Presidential Decisions found matching the specified criteria."
    
            return result
    
        except Exception as e:
            logger.exception("Error in tool 'search_cbbaskankarar'")
            return MevzuatSearchResultNew(
                documents=[],
                total_results=0,
                current_page=page_number,
                page_size=page_size,
                total_pages=0,
                query_used=log_params,
                error_message=f"An unexpected error occurred: {str(e)}"
            )
  • Tool registration via FastMCP @app.tool() decorator. The 'app' is a FastMCP instance defined at line 38.
    @app.tool()
    async def search_cbbaskankarar(
  • Input schema for 'search_cbbaskankarar' tool with 7 Pydantic Field parameters: query string (supports Boolean operators), exact phrase toggle, start/end date filters (YYYY), page number, search location (title/content/both), and page size.
        aranacak_ifade: Optional[str] = Field(
            None,
            description='Search query with optional Boolean operators: simple word (organize), AND (organize AND suç), OR (suç OR ceza), NOT (organize NOT terör), + for required (+term), grouping with (), exact phrase with quotes ("organize suç"). Leave empty to list all decrees.'
        ),
        tam_cumle: bool = Field(
            False,
            description="Exact phrase match (true) or any word match (false, default). Set to true when searching for exact phrases."
        ),
        baslangic_tarihi: Optional[str] = Field(
            None,
            description="Start year for filtering results (format: YYYY, e.g., '2018')"
        ),
        bitis_tarihi: Optional[str] = Field(
            None,
            description="End year for filtering results (format: YYYY, e.g., '2024')"
        ),
        page_number: int = Field(
            1,
            ge=1,
            description="Page number for pagination (starts at 1)"
        ),
        aranacak_yer: int = Field(
            3,
            ge=1,
            le=3,
            description="Where to search: 1=Title only, 2=Content only, 3=Both title and content (default)"
        ),
        page_size: int = Field(
            25,
            ge=1,
            le=100,
            description="Number of results per page (1-100)"
        )
    ) -> MevzuatSearchResultNew:
  • Return type is MevzuatSearchResultNew (imported from mevzuat_models). On success returns search results with documents list; on failure returns a MevzuatSearchResultNew with error_message.
    ) -> MevzuatSearchResultNew:
        """
        Search for Turkish Presidential Decisions (Cumhurbaşkanı Kararı) in both titles and content.
    
        IMPORTANT: Search is keyword-based, NOT by decision number. Use descriptive Turkish terms.
        Presidential Decisions are executive decisions (different from Presidential Decrees/Kararnamesi).
        Note: Bakanlar Kurulu Kararı (BKK) is NOT a separate type - older BKKs may appear here or in Kanun.
    
        Query Syntax: Simple keyword, AND, OR, NOT, +required, (grouping), "exact phrase"
    
        Example queries:
        - "atama" - Find decisions about appointments
        - "ihracat AND rejim" - Export regime decisions
        - "vergi" or "gümrük" - Tax or customs decisions
        - Leave empty with dates to list all decisions from a period
    
        Returns: Decision number, title, publication date, Official Gazette info. PDF format only.
        """
        search_req = MevzuatSearchRequestNew(
            mevzuat_tur="Cumhurbaşkanı Kararı",
            aranacak_ifade=aranacak_ifade or "",
            aranacak_yer=aranacak_yer,
            tam_cumle=tam_cumle,
            mevzuat_no=None,
            baslangic_tarihi=baslangic_tarihi,
            bitis_tarihi=bitis_tarihi,
            page_number=page_number,
            page_size=page_size
        )
    
        log_params = search_req.model_dump(exclude_defaults=True)
        logger.info(f"Tool 'search_cbbaskankarar' called with parameters: {log_params}")
    
        try:
            result = await mevzuat_client.search_documents(search_req)
    
            if not result.documents and not result.error_message:
                result.error_message = "No Presidential Decisions found matching the specified criteria."
    
            return result
    
        except Exception as e:
            logger.exception("Error in tool 'search_cbbaskankarar'")
            return MevzuatSearchResultNew(
                documents=[],
                total_results=0,
                current_page=page_number,
                page_size=page_size,
                total_pages=0,
                query_used=log_params,
                error_message=f"An unexpected error occurred: {str(e)}"
            )
Behavior4/5

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

No annotations provided, so the description carries full burden. It describes return fields (decision number, title, publication date, Official Gazette info), PDF format, and search behavior. It lacks details on rate limits or authentication but is transparent about results.

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 well-structured with sections for important notes, query syntax, examples, and returns. Every sentence adds value without 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?

Given multiple sibling search tools, this description fully covers how to use the tool, what it returns, and how it differs from others. Output schema exists but is supplemented by clear return description.

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 100%, so baseline is 3. The description adds value by providing example queries and syntax, reinforcing parameter usage beyond schema definitions.

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 searches for Turkish Presidential Decisions in titles and content, differentiating from other sibling tools like search_cbgenelge and explicitly contrasting with Presidential Decrees and BKKs.

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 crucial guidelines: keyword-based search (not by decision number), use of descriptive Turkish terms, clarification of decision types, and query syntax examples. While it doesn't explicitly list when to avoid this tool, the context of sibling tools makes it clear.

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/mevzuat-mcp'

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