boe AI Integration
Use boe with Pickaxe to automate cross-tool workflows while your team focuses on higher-leverage work. Ship faster with fewer repetitive steps.
Capabilities
7 capabilities
search_legislation
🔍 **MAIN TOOL**: Search Spanish laws in the official BOE database. **WHEN TO USE THIS TOOL?** - When you need to find Spanish legislation but do NOT know the BOE identifier - To explore laws by topic, keywords, or legal classification - To verify which regulations exist on a specific topic **KEY PARAMETERS:** **🔍 Search (at least one required):** - `titulo="Ley 40/2015"` → Exact search in titles - `query="texto:protección de datos"` → Full-text search - `query="titulo:laboral AND texto:despido"` → Advanced boolean search **🗂️ Code filters (optional):** - `departamento_codigo=123` → Ministry/department (get codes with get_auxiliary_data) - `rango_codigo=1300` → Type of regulation: 1300=Ley, 1200=Real Decreto Ley, 1100=Real Decreto - `materia_codigo=456` → Legal topic (get codes with get_auxiliary_data) **📅 Dates (format: YYYYMMDD):** - `fecha_desde="20200101"` → Regulations published since Jan 1 2020 - `fecha_hasta="20231231"` → Regulations published until Dec 31 2023 **⚡ Result control:** - `solo_vigentes=true` → Only CURRENTLY valid laws (critical for legal applications) - `limit=20` → Number of results (use -1 for ALL, but may be slow) - `response_format="json"` → For programmatic processing **🎯 RESPONSE FORMAT:** Returns array of results with: - `identificador`: BOE-A-YYYY-##### code (use it with other tools) - `titulo`: Full name of the regulation - `url_consolidado`: Link to updated consolidated text **💡 USAGE EXAMPLES:** **1. Search specific law by title:** ```python search_legislation(titulo="Ley 40/2015") ``` **2. Search by topic with filters:** ```python search_legislation( query="texto:protección de datos personales", solo_vigentes=true, limit=10 ) ``` **3. Advanced boolean search:** ```python search_legislation( query="titulo:laboral AND texto:despido AND NOT despido disciplinario", solo_vigentes=true ) ``` **4. Recent legislation by topic:** ```python # First: get topic code get_auxiliary_data(table="materias", search_term="laboral") # Then: search with the code search_legislation( materia_codigo=1234, # obtained code fecha_desde="20200101", solo_vigentes=true ) ``` **🔄 TYPICAL WORKFLOW:** 1. Use search_legislation to find relevant laws 2. Extract the `identificador` from the result 3. Use that identifier with other tools: - `get_legislation_metadata(identificador="BOE-A-2015-10566")` - `get_legislation_text(identificador="BOE-A-2015-10566", option="index")` - `get_legislation_analysis(identificador="BOE-A-2015-10566")` **⚠️ IMPORTANT:** - Always use `solo_vigentes=true` when you need laws applicable TODAY - The returned `identificador` parameter is KEY to use other tools - Date format: YYYYMMDD (ex: "20231231") - Minimum 1 search parameter: `titulo` or `query`
get_legislation_metadata
Get comprehensive metadata for specific consolidated legislation. Retrieves complete metadata including identification, classification, publication details, validity status, consolidation info, and official links. Args: identificador: BOE ID (format: BOE-A-YYYY-#####) response_format: markdown/json Returns: Complete metadata with rank, department, dates, validity status, links (ELI, consolidated text). Examples: get_legislation_metadata(identificador="BOE-A-2015-10566") get_legislation_metadata(identificador="BOE-A-1978-31229", response_format="json")
get_legislation_analysis
Retrieve comprehensive legal analysis for a specific Spanish legislation norm, including its legal context, classification, and relationships with other norms. 🎯 **WHAT IS LEGAL ANALYSIS?** Legal analysis in the BOE system provides a structured overview of how a specific law fits within the broader legal framework. It answers critical questions: - What legal subjects does this law address? (materias) - What previous laws does this law affect, modify, or repeal? (referencias anteriores) - What subsequent laws have modified, developed, or repealed this law? (referencias posteriores) - What additional notes or classifications apply? This analysis is essential for understanding the evolution and current status of legislation. 🔍 **COMPONENTS OF LEGAL ANALYSIS:** 1. **MATERIAS (Subjects)**: Legal classification topics - Examples: "Derecho civil", "Derecho laboral", "Hacienda pública", "Medio ambiente" - Used for categorizing and searching legislation by topic 2. **NOTAS ADICIONALES**: Supplementary information and observations - May include special circumstances, transitional provisions, or clarifications 3. **REFERENCIAS ANTERIORES (Prior References)**: Previous legislation this law affects - **DEROGA**: Repeals previous legislation completely - **MODIFICA**: Amends or modifies previous legislation - **DESARROLLA**: Develops or implements previous legislation - Example: "Ley 1/2000, de 7 de enero, de modificación del Código civil" 4. **REFERENCIAS POSTERIORES (Posterior References)**: Subsequent legislation affecting this law - **SE DEROGA**: This law is repealed by later legislation - **SE MODIFICA**: This law is amended by later legislation - **SE DESARROLLA**: This law is developed by later legislation - **SE PRORROGA**: This law is extended by later legislation - Example: "Real Decreto-ley 11/2020, de 31 de marzo, por el que se adoptan medidas urgentes" 📊 **OUTPUT STRUCTURE:** The function returns a structured analysis with: - Basic metadata (rank, dates, department) - List of legal subjects (materias) - List of prior references with relationship types - List of posterior references with relationship types - Additional notes when available Args: identificador: **BOE identifier** (format: BOE-A-YYYY-#####). This is the unique code assigned to each legal norm. Example: "BOE-A-2015-10566" (Ley 40/2015 de Régimen Jurídico del Sector Público) response_format: **Output format** - "markdown" (human-readable) or "json" (machine-readable) Default: markdown Returns: **Legal analysis** containing: - **materias**: Array of legal subjects/topics - **notas**: Additional observations and classifications - **referencias_anteriores**: Previous legislation affected by this law - **referencias_posteriores**: Subsequent legislation affecting this law - **metadatos_basicos**: Rank, department, dates, and other classification data In markdown format, the analysis is organized in sections with clear headings. In JSON format, returns the raw analysis data structure from the BOE. Raises: ResourceNotFoundError: If the legislation identifier is not found InternalError: If the scraping process fails or the BOE service is unavailable 💡 **PRACTICAL USE CASES:** 1. **CHECKING CURRENT VALIDITY**: Use posterior references to see if a law has been repealed or modified. If "SE DEROGA" appears, the law is no longer valid. 2. **LEGAL RESEARCH**: Trace the evolution of legal concepts by following posterior references to see how a law has been developed over time. 3. **IMPACT ANALYSIS**: Use prior references to understand what previous legislation a new law modifies or repeals. 4. **TOPIC CLASSIFICATION**: Use materias to understand the legal domain and find related legislation. 🔍 **TYPICAL WORKFLOWS:** Workflow 1 - Check if a law is still valid: 1. get_legislation_analysis(identificador="BOE-A-2015-10566") 2. Review "Posterior References" section 3. Look for "SE DEROGA" or "SE MODIFICA" entries 4. If found, the law may be partially or fully repealed Workflow 2 - Understand legal context: 1. get_legislation_analysis(identificador="BOE-A-2015-10566") 2. Review "Subjects" to understand the legal domain 3. Check "Prior References" to see what previous laws it modifies 4. Use get_legislation_text to read specific referenced articles Workflow 3 - Track legislative evolution: 1. get_legislation_analysis(identificador="BOE-A-1978-31229") # Original law 2. Note all posterior references 3. For each reference, get its analysis to continue the chain 4. Build a timeline of legislative changes 📖 **EXAMPLES:** # Get analysis for Ley 40/2015 (Public Sector Law) get_legislation_analysis(identificador="BOE-A-2015-10566") # Get analysis in JSON format for programmatic processing get_legislation_analysis( identificador="BOE-A-2015-10566", response_format="json" ) # Analyze a constitutional law get_legislation_analysis(identificador="BOE-A-1978-31229") # Check a recent law for modifications get_legislation_analysis(identificador="BOE-A-2023-12345") ⚠️ **ERROR HANDLING:** - Returns "No analysis found" if the legislation exists but has no analysis data - Returns error if the identifier format is invalid - Returns error if the BOE service is unavailable - Uses scraper fallback if API fails 🔗 **RELATED TOOLS:** - Use `get_legislation_metadata` for basic identification and classification - Use `get_legislation_text` to read the actual content of the law - Use `search_legislation` to find laws by subject or keyword - Use `get_auxiliary_data` with table="relaciones-anteriores" or "relaciones-posteriores" to understand relationship type codes
get_legislation_text
Retrieve consolidated legal text from Spanish legislation with flexible content scoping and pagination. This is the primary tool for accessing the actual content of laws and regulations. It provides four different access modes to accommodate various research needs, from browsing the structure to retrieving specific sections or the complete text. 🎯 PRIMARY USE CASES: 1. DISCOVERY & NAVIGATION (option="index"): - First step when exploring unfamiliar legislation - Shows hierarchical structure (Titles, Chapters, Articles, Provisions) - Provides block IDs needed for other operations - Includes snippets and metadata for each section 2. TARGETED READING (option="block"): - Read specific articles or sections by ID - Perfect when you know exactly what you need - Fastest option for retrieving specific content 3. COMPREHENSIVE ANALYSIS (option="full"): - Retrieve entire legislation text - Use with pagination (max_characters + offset) for large documents - Includes historical versions if requested 4. CUSTOM SELECTION (option="subset"): - Multiple blocks using flexible selection rules - Range-based selection (e.g., articles 1-10) - Structural scope selection (e.g., entire Chapter with descendants) - Manual block ID lists 📋 BLOCK ID SYSTEM: Block IDs are short identifiers automatically generated from section titles: - Articles: "a1", "a2", "a3" (Artículo 1, Artículo 2, etc.) - Additional provisions: "da1", "da2" (Disposición adicional 1, 2) - Transitory provisions: "dt1", "dt2" (Disposición transitoria 1, 2) - Final provisions: "df1", "df2" (Disposición final 1, 2) - Chapters: "c1", "c2" (Capítulo 1, 2) - Titles: "t1", "t2" (Título 1, 2) - Special: "preambulo", "prologo", "firma" Use option="index" first to see available block IDs for a specific legislation. 🔄 VERSION SCOPE & HISTORY: The version_scope parameter controls historical content: - CURRENT: Latest version only (fastest, default) → Use when you only need current law - CURRENT_WITH_HISTORY: Latest version + modification history → Shows how each section has changed over time → Includes dates and modifying legislation references - ALL: Complete version history with full content → Comprehensive historical analysis → Shows all previous versions of each section The history_presentation parameter (for CURRENT_WITH_HISTORY) controls detail level: - NONE: No history shown - METADATA_ONLY: Shows modification dates and references only - FULL_CONTENT: Shows complete previous versions history_limit caps the number of historical versions shown per block (1-100). 📊 PAGINATION & RESPONSE SIZE: Large legislation texts may exceed response limits. Use pagination: - max_characters: Limit response size (1,000-500,000 characters) - offset: Start position for next chunk (0-based) The response includes navigation hints when content is truncated. 🎛️ SELECTION OPTIONS (for option="subset"): The selection parameter supports three selection methods: 1. block_ids: Explicit list of block IDs Example: ["a1", "a2", "da1", "df1"] 2. range: Inclusive range from start to end block Example: {"start": "a1", "end": "a10"} → articles 1-10 3. scope: Structural selection with hierarchy awareness Example: { "seed_block_id": "c1", "include_self": true, "include_descendants": true, "stop_at_same_level": true, "depth_limit": 2 } → Selects Chapter 1 and its contents (2 levels deep) Args: identificador: BOE identifier (format: BOE-A-YYYY-#####). Example: "BOE-A-2015-10566" (Ley 40/2015) option: Access mode determining what content to retrieve: - "index": Table of contents with block IDs and metadata - "full": Complete legislation text (all blocks) - "block": Single specific block by ID - "subset": Multiple blocks using selection rules index_detail: Detail level for index mode: - "basic": Block IDs and titles only - "detailed": Includes snippets and metadata (default) block_id: Required when option="block". Block identifier from the index (e.g., "a1", "da1", "c2") selection: Required when option="subset". Selection specification using block_ids, range, or scope. response_format: Output format: - "markdown": Human-readable formatted text (default) - "json": Structured machine-readable data version_scope: Historical version control: - "current": Latest version only (fastest) - "current_with_history": Latest + modification history - "all": Complete version history history_presentation: History detail level (for CURRENT_WITH_HISTORY): - "none": No history - "metadata_only": Dates and references only - "full_content": Complete previous versions history_limit: Maximum historical versions per block (1-100). Only applies when including history. show_change_flags: Include references to modifying legislation. Default: true. Set false for cleaner output. max_characters: Response size limit (1,000-500,000 characters). Use with offset for pagination of large texts. offset: Character offset for pagination (0-based). Use with max_characters to retrieve specific chunks. raw_xml: Return raw XML instead of processed text. Use when automatic conversion is insufficient for complex structures. Default: false. Returns: Legislation text content in requested format: - For index: Hierarchical structure with block IDs and metadata - For block/subset/full: Actual legal text with optional history - Includes pagination navigation when truncated Response includes: - Current version content (always) - Historical versions (if requested) - Modification metadata (dates, references) - Block structure information Raises: ValueError: Invalid parameter combinations (e.g., subset without selection) ResourceNotFoundError: Legislation not found or not consolidated InternalError: API or processing errors 🔧 RAW XML MODE: The raw_xml parameter allows direct access to the unprocessed XML structure: - Set raw_xml=True when you detect complex formatting (tables, formulas, nested structures) - The XML preserves exact structure including all formatting metadata - Useful when automatic conversion produces suboptimal results - AI can parse the XML directly to extract precise information Example use cases for raw_xml=True: - Complex tables with merged cells or multiple headers - Mathematical formulas with special notation - Nested lists with specific formatting - Diagrams or structured data that needs precise extraction 💡 BEST PRACTICES: 1. Start with index: Always use option="index" first to explore structure 2. Use block mode: For targeted reading, option="block" is most efficient 3. Paginate large texts: Use max_characters=50000 + offset for full texts 4. Control history scope: Use version_scope="current" when history isn't needed 5. Leverage selection: option="subset" with range is great for article ranges 🔍 TYPICAL WORKFLOWS: Workflow 1 - Find and read specific article: 1. get_legislation_text(identificador="BOE-A-2015-10566", option="index") 2. Locate block_id for desired article (e.g., "a15") 3. get_legislation_text(identificador="BOE-A-2015-10566", option="block", block_id="a15") Workflow 2 - Read full law with pagination: 1. get_legislation_text(identificador="BOE-A-2015-10566", option="full", max_characters=50000) 2. Check if truncated → use offset=50000 for next chunk Workflow 3 - Analyze modifications to specific article: 1. get_legislation_text(identificador="BOE-A-2015-10566", option="block", block_id="a22", version_scope="current_with_history", history_presentation="full_content") 2. Review historical versions and modification references Workflow 4 - Retrieve article range: 1. get_legislation_text(identificador="BOE-A-2015-10566", option="subset", selection={"range": {"start": "a1", "end": "a10"}}) 📖 EXAMPLES: # Get index to explore structure get_legislation_text(identificador="BOE-A-2015-10566", option="index") # Read specific article get_legislation_text(identificador="BOE-A-2015-10566", option="block", block_id="a1") # Get full text with pagination (first 50K chars) get_legislation_text(identificador="BOE-A-2015-10566", option="full", max_characters=50000) # Get next chunk (chars 50000-100000) get_legislation_text(identificador="BOE-A-2015-10566", option="full", max_characters=50000, offset=50000) # Read articles 1-5 get_legislation_text(identificador="BOE-A-2015-10566", option="subset", selection={"range": {"start": "a1", "end": "a5"}}) # Get article with modification history get_legislation_text(identificador="BOE-A-2015-10566", option="block", block_id="a22", version_scope="current_with_history", history_presentation="full_content") # Get chapter and its contents get_legislation_text(identificador="BOE-A-2015-10566", option="subset", selection={"scope": {"seed_block_id": "c1", "include_descendants": true}}) # Get index in JSON format get_legislation_text(identificador="BOE-A-2015-10566", option="index", response_format="json")
search_legislation_text
Search for occurrences of a query string within a consolidated law. The search honours the requested :class:`TextVersionScope`: - ``current`` inspecciona únicamente la versión vigente de cada bloque. - ``current_with_history`` añade coincidencias históricas resumidas (una entrada por versión). - ``all`` reproduce todas las versiones con fragmentos completos, manteniendo el comportamiento legado. Results are grouped into two channels (vigente e historial) in both Markdown and JSON outputs, including explicit metadata about matches, límites aplicados y paginación.
Get Started
Click any tool below to instantly start building AI tools that enhance your workflow and productivity
Chatbot Builder
Create intelligent chatbots that handle customer inquiries, provide support, and answer questions 24/7.
Team Communication Hub
Build tools that streamline team communication, send notifications, and coordinate workflows.
Notification System
Automate notifications across channels to keep users informed about important updates and events.
Conversation Analyzer
Analyze chat logs and conversations to extract insights, sentiment, and key information.
Message Routing Assistant
Intelligently route messages to the right team members based on content and context.
Response Generator
Generate contextual responses to messages using AI that understands conversation history.
Related Actions
Excel
excel
Microsoft Excel is a powerful spreadsheet application for data analysis, calculations, and visualization, enabling users to organize and process data with formulas, charts, and pivot tables
11 uses
Youtube
youtube
YouTube is a video-sharing platform with user-generated content, live streaming, and monetization opportunities, widely used for marketing, education, and entertainment
366 uses
Instagram is a social media platform for sharing photos, videos, and stories. Only supports Instagram Business and Creator accounts, not Instagram Personal accounts.
1.66k uses
Linkup
linkup
Search the web in real time to get trustworthy, source-backed answers. Find the latest news and comprehensive results from the most relevant sources. Use natural language queries to quickly gather facts, citations, and context.
4.93k uses
Airtable
airtable
Airtable merges spreadsheet functionality with database power, enabling teams to organize projects, track tasks, and collaborate through customizable views, automation, and integrations for data management
1.27k uses
GitHub
github
GitHub is a code hosting platform for version control and collaboration, offering Git-based repository management, issue tracking, and continuous integration features
115 uses
Explore Pickaxe Templates
Get started faster with pre-built templates. Choose from our library of ready-to-use AI tools and customize them for your needs.
Ready to Connect boe?
Build your AI tool with this MCP server in the Pickaxe builder.
Build with Pickaxe