detalle_norma
Fetch metadata and plain text of a Peruvian legal norm by its SPIJ ID, with pagination for long texts. Use offsets to read specific ranges or final sections of judicial decisions.
Instructions
Devuelve los METADATOS y el TEXTO de una norma del SPIJ por su id.
Args: id: identificador del SPIJ, ej 'H1453062' (lo devuelve buscar_normas). offset: desde que caracter del texto empezar (0 = inicio). max_chars: maximo de caracteres de texto a devolver en esta llamada (0 = usa el limite por defecto). Si el texto es mas largo, 'siguiente_offset' indica por donde continuar. desde_final: si es True, devuelve los ULTIMOS max_chars caracteres (en sentencias judiciales la decision 'RESUELVE' esta al final).
Devuelve: ok, id, url_web (para abrir la norma en el sitio SPIJ), codigoNorma, dispositivoLegal, sector, fechaPublicacion, ruta, titulo, sumilla, texto (texto plano, sin HTML), total_caracteres, texto_truncado, siguiente_offset (si hay mas texto).
Nota: si el texto es muy largo para tu contexto, lee por rangos con offset (ej offset=20000) o la cola con desde_final=True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| offset | No | ||
| max_chars | No | ||
| desde_final | No |