> ## Documentation Index
> Fetch the complete documentation index at: https://code.dcycle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance Tools

> MCP tools for searching environmental legislation and regulatory requirements

# Compliance Tools

Search and browse the environmental legislation database — Spanish national and regional regulations covering environmental, labor, governance, and ESG reporting obligations. Each entry includes the official title, status, categories, and an LLM-generated summary.

<Note>
  The legislation database currently covers **Spanish law** (BOE — Boletín Oficial del Estado). Field names use Spanish terminology (e.g. `titulo`, `estado`, `categorias`).
</Note>

## `list_legislation`

Search applicable environmental legislation with optional text search.

**Parameters:**

| Parameter         | Type    | Required | Default     | Description                                |
| ----------------- | ------- | -------- | ----------- | ------------------------------------------ |
| `organization_id` | string  | No       | default org | Organization UUID                          |
| `search`          | string  | No       | —           | Text search across titles and descriptions |
| `page`            | integer | No       | 1           | Page number                                |
| `size`            | integer | No       | 50          | Results per page                           |

**Example response:**

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "items": [
    {
      "id": "a1b2c3d4-...",
      "identificador": "BOE-A-2022-5809",
      "titulo": "Ley 7/2022, de 8 de abril, de residuos y suelos contaminados para una economía circular",
      "rango": "ley",
      "jurisdiccion": "es",
      "ambito": "nacional",
      "categorias": ["medio_ambiente"],
      "subcategorias": ["residuos", "economia_circular"],
      "fecha_publicacion": "2022-04-09",
      "estado": "vigente",
      "resumen_llm": "Establishes the regulatory framework for waste prevention and management...",
      "fuente_url": "https://www.boe.es/eli/es/l/2022/04/08/7/con",
      "created_at": "2025-01-10T12:00:00"
    }
  ],
  "total": 234,
  "page": 1,
  "size": 50,
  "pages": 5
}
```

**Key response fields:**

| Field           | Description                                                                              |
| --------------- | ---------------------------------------------------------------------------------------- |
| `identificador` | Official BOE identifier (e.g. `BOE-A-2022-5809`)                                         |
| `titulo`        | Full official title of the legislation                                                   |
| `rango`         | Legal rank: `ley`, `real_decreto`, `orden`, `reglamento`, etc.                           |
| `ambito`        | Territorial scope: `nacional` or `autonomico` (regional)                                 |
| `estado`        | Status: `vigente` (in force), `derogada` (repealed), `parcialmente_derogada`, `expirada` |
| `categorias`    | ESG categories: `medio_ambiente`, `laboral`, `gobernanza`, `reporting`, etc.             |
| `resumen_llm`   | AI-generated summary in English                                                          |
| `fuente_url`    | Official BOE source URL                                                                  |

## `get_legislation`

Get full details for a specific piece of legislation, including the complete text.

**Parameters:**

| Parameter         | Type   | Required | Default     | Description             |
| ----------------- | ------ | -------- | ----------- | ----------------------- |
| `legislation_id`  | string | **Yes**  | —           | UUID of the legislation |
| `organization_id` | string | No       | default org | Organization UUID       |

<Note>
  The detail response includes `texto_completo` — the full consolidated text of the legislation. This can be very large for comprehensive laws.
</Note>

**Example prompts:**

```
"What environmental legislation applies to us?"
"Search for waste management regulations"
"Show me CSRD-related legislation"
"List all active environmental laws"
"What are the emissions trading regulations in Spain?"
```

## Workflow

1. **Search legislation** — `list_legislation` with a search term to find relevant regulations
2. **Get details** — `get_legislation` for the full text and summary of a specific law
3. **Check compliance scope** — Compare the legislation's `categorias` with your organization's activities

## Related

<CardGroup cols={2}>
  <Card title="Organizations" icon="building" href="/mcp/organizations">
    Organization details to match against legislation scope
  </Card>

  <Card title="Emissions" icon="smog" href="/mcp/emissions">
    GHG emissions data relevant to environmental compliance
  </Card>
</CardGroup>
