"""Figshare tools.
Figshare's ``GET /v2/articles`` ignores ``search_for`` (every query lists the same
newest articles, and a nonsense string matches as many as a real word); text search
only works as ``POST /v2/articles/search`` with a JSON body. ``BaseRESTTool`` issues
GET requests only, so search tools mark themselves with ``fields.http_method: POST``
and are sent that way; everything else behaves exactly like ``BaseRESTTool``.
The search endpoint returns a bare list with no total, so a POST search validates
its page inputs locally and reports truthful page metadata (``has_more``,
``next_page``, ``matches_lower_bound``) instead of a page that looks complete.
"""
from typing import Any, Dict
from .base_rest_tool import BaseRESTTool
from .http_utils import request_with_retry
from .tool_registry import register_tool