Google ADK Tools¶
tools ¶
Assembly: Fonky
Filename: tools.py
Author: Terry D. Eppler
Created: 08-23-2026
Last Modified By: Terry D. Eppler
Last Modified On: 08-31-2026
fetch_arxiv ¶
fetch_arxiv(
question: str,
max_documents: int | None = None,
full_documents: bool | None = None,
include_metadata: bool | None = None,
) -> Any
Retrieve ArXiv research documents.
Purpose
Retrieve ArXiv research documents through ArXiv. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested. Boolean options control retrieval depth or supplemental content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
required |
max_documents
|
int | None
|
Maximum number of documents to retrieve. |
None
|
full_documents
|
bool | None
|
Whether to retrieve full document content instead of abbreviated search results. |
None
|
include_metadata
|
bool | None
|
Whether provider metadata should be included with retrieved content. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_drive ¶
fetch_google_drive(
question: str,
folder_id: str = "root",
results: int = 10,
template: str = "gdrive-query",
mime_type: str | None = None,
mode: str = "documents",
) -> Any
Retrieve Google Drive documents.
Purpose
Retrieve Google Drive documents through Google Drive. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
required |
folder_id
|
str
|
Provider folder identifier that scopes the operation. |
'root'
|
results
|
int
|
Maximum number of search results to request. |
10
|
template
|
str
|
Provider query template used to construct the request. |
'gdrive-query'
|
mime_type
|
str | None
|
Optional MIME type used to restrict matching files. |
None
|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'documents'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_wikipedia ¶
fetch_wikipedia(
question: str,
language: str | None = None,
max_documents: int | None = None,
include_metadata: bool | None = None,
) -> Any
Retrieve Wikipedia documents.
Purpose
Retrieve Wikipedia documents through Wikipedia. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested. Boolean options control retrieval depth or supplemental content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
required |
language
|
str | None
|
Language code used for provider results or parsing. |
None
|
max_documents
|
int | None
|
Maximum number of documents to retrieve. |
None
|
include_metadata
|
bool | None
|
Whether provider metadata should be included with retrieved content. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_news ¶
fetch_news(
endpoint: str = "all",
query: str = "",
language: str = "en",
categories: str = "",
exclude_categories: str = "",
locale: str = "",
domains: str = "",
exclude_domains: str = "",
source_ids: str = "",
exclude_source_ids: str = "",
published_after: str = "",
published_before: str = "",
published_on: str = "",
sort: str = "published_at",
limit: int = 10,
page: int = 1,
include_similar: bool = True,
headlines_per_category: int = 6,
time: int = 10,
api_key: str | None = None,
) -> Any
Retrieve The News API article.
Purpose
Retrieve The News API article through The News API. The query text determines the records or documents matched by the provider. Date and time arguments constrain the requested interval when supplied. Result-count arguments bound the amount of data requested. Boolean options control retrieval depth or supplemental content. When supplied, api_key overrides the configured provider credential for this request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
endpoint
|
str
|
Provider endpoint or endpoint family to request. |
'all'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
language
|
str
|
Language code used for provider results or parsing. |
'en'
|
categories
|
str
|
Comma-separated news categories used to include matching articles. |
''
|
exclude_categories
|
str
|
Filter value used to exclude categories from provider results. |
''
|
locale
|
str
|
Locale filter applied to news results. |
''
|
domains
|
str
|
Comma-separated source domains used to include matching news articles. |
''
|
exclude_domains
|
str
|
Filter value used to exclude domains from provider results. |
''
|
source_ids
|
str
|
Provider identifiers for the selected source. |
''
|
exclude_source_ids
|
str
|
Filter value used to exclude source ids from provider results. |
''
|
published_after
|
str
|
Earliest publication timestamp accepted by the news query. |
''
|
published_before
|
str
|
Latest publication timestamp accepted by the news query. |
''
|
published_on
|
str
|
Specific publication date used to restrict news results. |
''
|
sort
|
str
|
Provider-supported result ordering expression. |
'published_at'
|
limit
|
int
|
Maximum number of records or items to return. |
10
|
page
|
int
|
One-based result page to request. |
1
|
include_similar
|
bool
|
Whether to include similar in the result. |
True
|
headlines_per_category
|
int
|
Maximum number of headlines returned for each category in headline mode. |
6
|
time
|
int
|
Request timeout in seconds. |
10
|
api_key
|
str | None
|
Optional credential override used for the active request. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_cse_search ¶
fetch_cse_search(
keywords: str,
results: int = 10,
start: int = 1,
exact_terms: str = "",
exclude_terms: str = "",
file_type: str = "",
date_restrict: str = "",
gl: str = "",
lr: str = "",
safe: str = "off",
search_type: str = "",
site_search: str = "",
site_search_filter: str = "",
sort: str = "",
img_size: str = "",
img_type: str = "",
img_color_type: str = "",
img_dominant_color: str = "",
time: int = 10,
api_key: str | None = None,
cse_id: str | None = None,
) -> Any
Retrieve Google Programmable Search Engine results.
Purpose
Retrieve results through Google Programmable Search Engine (Custom Search JSON API). The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested. When supplied, api_key overrides the configured provider credential for this request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keywords
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
required |
results
|
int
|
Maximum number of search results to request. |
10
|
start
|
int
|
Starting result position used for pagination. |
1
|
exact_terms
|
str
|
Phrase that must appear exactly in Google Custom Search results. |
''
|
exclude_terms
|
str
|
Terms that must not appear in Google Custom Search results. |
''
|
file_type
|
str
|
File-extension filter applied to Google Custom Search results. |
''
|
date_restrict
|
str
|
Google Custom Search date restriction expression. |
''
|
gl
|
str
|
Google country-code boost applied to search results. |
''
|
lr
|
str
|
Google language restriction expression. |
''
|
safe
|
str
|
Google SafeSearch setting. |
'off'
|
search_type
|
str
|
Google Custom Search result type; use the provider-supported image-search value when requesting images. |
''
|
site_search
|
str
|
Domain or site used to restrict Google Custom Search results. |
''
|
site_search_filter
|
str
|
Whether |
''
|
sort
|
str
|
Provider-supported result ordering expression. |
''
|
img_size
|
str
|
Image-size filter used for Google image search. |
''
|
img_type
|
str
|
Google image type filter. |
''
|
img_color_type
|
str
|
Google image color-type filter. |
''
|
img_dominant_color
|
str
|
Dominant-color filter used for Google image search. |
''
|
time
|
int
|
Request timeout in seconds. |
10
|
api_key
|
str | None
|
Optional credential override used for the active request. |
None
|
cse_id
|
str | None
|
Google Programmable Search Engine identifier. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_gov_data ¶
fetch_gov_data(
mode: str = "search",
query: str = "",
page_size: int = 10,
offset_mark: str = "*",
sort_field: str = "score",
sort_order: str = "DESC",
package_id: str = "",
collection: str = "",
start_date: str = "",
time: int = 20,
) -> Any
Retrieve Data.gov package and collection.
Purpose
Retrieve Data.gov package and collection through Data.gov. Use mode to select among collection, package_summary, search. The query text determines the records or documents matched by the provider. Date and time arguments constrain the requested interval when supplied. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'search'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
page_size
|
int
|
Maximum number of records requested per page. |
10
|
offset_mark
|
str
|
Provider continuation marker used for paginated Data.gov search results. |
'*'
|
sort_field
|
str
|
Provider field used to order search results. |
'score'
|
sort_order
|
str
|
Sort direction applied to the provider search. |
'DESC'
|
package_id
|
str
|
Provider identifier for the selected package. |
''
|
collection
|
str
|
Provider collection identifier used to restrict results. |
''
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_congress ¶
fetch_congress(
mode: str = "congresses",
congress: int = 0,
bill_type: str = "",
bill_number: int = 0,
law_type: str = "",
law_number: int = 0,
report_type: str = "",
report_number: int = 0,
offset: int = 0,
limit: int = 20,
sort: str = "updateDate+desc",
from_date_time: str = "",
to_date_time: str = "",
conference: bool = False,
time: int = 20,
) -> Any
Retrieve Congress.gov legislative data.
Purpose
Retrieve Congress.gov legislative data through Congress.gov. Use mode to select among bill_detail, bills, congresses, law_detail, laws, report_detail, reports. Date and time arguments constrain the requested interval when supplied. Result- count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'congresses'
|
congress
|
int
|
Congress number used to scope legislative records. |
0
|
bill_type
|
str
|
Provider type selector for bill. |
''
|
bill_number
|
int
|
Legislative bill number used with the selected Congress and bill type. |
0
|
law_type
|
str
|
Provider type selector for law. |
''
|
law_number
|
int
|
Public or private law number used with the selected law type. |
0
|
report_type
|
str
|
Provider type selector for report. |
''
|
report_number
|
int
|
Committee report number used with the selected Congress and report type. |
0
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
limit
|
int
|
Maximum number of records or items to return. |
20
|
sort
|
str
|
Provider-supported result ordering expression. |
'updateDate+desc'
|
from_date_time
|
str
|
Earliest provider update timestamp to include. |
''
|
to_date_time
|
str
|
Latest provider update timestamp to include. |
''
|
conference
|
bool
|
Whether to restrict committee reports to conference reports. |
False
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_internet_archive ¶
fetch_internet_archive(
keywords: str,
fields: List[str] | None = None,
rows: int = 10,
page: int = 1,
sort: str = "downloads desc",
media_type: str = "",
collection: str = "",
time: int = 20,
) -> Any
Retrieve Internet Archive search and metadata.
Purpose
Retrieve Internet Archive search and metadata through Internet Archive. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
keywords
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
required |
fields
|
List[str] | None
|
Comma-separated or provider-specific field selection. |
None
|
rows
|
int
|
Maximum number of rows to request. |
10
|
page
|
int
|
One-based result page to request. |
1
|
sort
|
str
|
Provider-supported result ordering expression. |
'downloads desc'
|
media_type
|
str
|
Provider type selector for media. |
''
|
collection
|
str
|
Provider collection identifier used to restrict results. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_grokipedia ¶
fetch_grokipedia(
mode: str = "search",
query: str = "",
page: str = "",
limit: int = 12,
offset: int = 0,
include_content: bool = True,
) -> Any
Retrieve Grokipedia search and page.
Purpose
Retrieve Grokipedia search and page through Grokipedia. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'search'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
page
|
str
|
One-based result page to request. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
12
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
include_content
|
bool
|
Whether to include content in the result. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_arxiv ¶
Load ArXiv research documents.
Purpose
Load ArXiv research documents using the ArXiv loader. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Search query or prompt submitted to the backing loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_wikipedia ¶
Load Wikipedia articles.
Purpose
Load Wikipedia articles using the Wikipedia loader. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
str
|
Search query or prompt submitted to the backing loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_naval_observatory ¶
fetch_naval_observatory(
mode: str = "celnav",
date_value: str = "",
time_value: str = "",
latitude: float = 0.0,
longitude: float = 0.0,
location_label: str = "",
time: int = 20,
) -> Any
Retrieve U.S. Naval Observatory celestial-navigation data.
Purpose
Retrieve U.S. Naval Observatory celestial-navigation data through U.S. Naval Observatory. Coordinate and bounding arguments constrain geographic scope when supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'celnav'
|
date_value
|
str
|
Calendar date used by the selected provider operation. |
''
|
time_value
|
str
|
Clock time or timestamp used by the selected provider operation. |
''
|
latitude
|
float
|
Latitude in decimal degrees. |
0.0
|
longitude
|
float
|
Longitude in decimal degrees. |
0.0
|
location_label
|
str
|
Human-readable label associated with the supplied coordinates. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_satellite_center ¶
fetch_satellite_center(
mode: str = "observatories",
query: str = "",
start_time: str = "",
end_time: str = "",
coordinate_systems: str = "gse",
resolution_factor: int = 1,
time: int = 20,
) -> Any
Retrieve SSC satellite observatory, ground-station, and location data.
Purpose
Retrieve SSC satellite observatory, ground-station, and location data through NASA Satellite Situation Center. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'observatories'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
start_time
|
str
|
Beginning timestamp for the requested provider interval. |
''
|
end_time
|
str
|
Ending timestamp for the requested provider interval. |
''
|
coordinate_systems
|
str
|
Coordinate system or comma-separated coordinate systems requested from the satellite service. |
'gse'
|
resolution_factor
|
int
|
Sampling resolution factor applied to returned satellite location data. |
1
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_nearby_objects ¶
fetch_nearby_objects(
mode: str = "close_approaches",
start_date: str = "",
end_date: str = "",
query: str = "",
query_type: str = "sstr",
dist_max: str = "10LD",
body: str = "Earth",
sort: str = "date",
limit: int = 20,
dv: float = 6.0,
dur: int = 360,
stay: int = 8,
launch: str = "2020-2045",
h: float = 26.0,
occ: int = 7,
include_physical: bool = True,
include_close_approaches: bool = True,
ca_body: str = "Earth",
include_discovery: bool = True,
time: int = 20,
) -> Any
Retrieve JPL SSD and CNEOS near-Earth object data.
Purpose
Retrieve JPL SSD and CNEOS near-Earth object data through NASA/JPL near-Earth object services. The query text determines the records or documents matched by the provider. Date and time arguments constrain the requested interval when supplied. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'close_approaches'
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
query_type
|
str
|
Provider type selector for query. |
'sstr'
|
dist_max
|
str
|
Maximum close-approach distance expression accepted by the JPL service. |
'10LD'
|
body
|
str
|
Solar-system body used as the reference object. |
'Earth'
|
sort
|
str
|
Provider-supported result ordering expression. |
'date'
|
limit
|
int
|
Maximum number of records or items to return. |
20
|
dv
|
float
|
Delta-v threshold or mission constraint used by the near-Earth object query. |
6.0
|
dur
|
int
|
Mission duration constraint, in days, used by the near-Earth object query. |
360
|
stay
|
int
|
Target stay-duration constraint, in days, used by the near-Earth object query. |
8
|
launch
|
str
|
Launch-year or launch-window expression used by the near-Earth object query. |
'2020-2045'
|
h
|
float
|
Absolute-magnitude threshold used by the near-Earth object query. |
26.0
|
occ
|
int
|
Opportunity-count or occurrence constraint used by the mission query. |
7
|
include_physical
|
bool
|
Whether to include physical in the result. |
True
|
include_close_approaches
|
bool
|
Whether to include close approaches in the result. |
True
|
ca_body
|
str
|
Reference body used for close-approach data. |
'Earth'
|
include_discovery
|
bool
|
Whether to include discovery in the result. |
True
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_open_science ¶
fetch_open_science(
mode: str = "dataset",
query: str = "",
accession: str = "",
format_value: str = "json",
time: int = 20,
) -> Any
Retrieve NASA Open Science Data Repository resources.
Purpose
Retrieve NASA Open Science Data Repository resources through NASA Open Science Data Repository. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'dataset'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
accession
|
str
|
Dataset accession identifier used to retrieve a specific Open Science resource. |
''
|
format_value
|
str
|
Provider output format. |
'json'
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_space_weather ¶
fetch_space_weather(
mode: str = "cme",
start_date: str = "",
end_date: str = "",
time: int = 20,
location: str = "ALL",
catalog: str = "ALL",
notification_type: str = "all",
most_accurate_only: bool = True,
complete_entry_only: bool = True,
speed: int = 0,
half_angle: int = 0,
keyword: str = "",
api_key: str | None = None,
) -> Any
Retrieve NASA DONKI space weather endpoints.
Purpose
Retrieve NASA DONKI space weather endpoints through NASA DONKI. Date and time arguments constrain the requested interval when supplied. When supplied, api_key overrides the configured provider credential for this request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'cme'
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
location
|
str
|
Place name, address, or location description resolved by the provider. |
'ALL'
|
catalog
|
str
|
Provider catalog filter. |
'ALL'
|
notification_type
|
str
|
Provider type selector for notification. |
'all'
|
most_accurate_only
|
bool
|
Whether to restrict results to the provider-designated most accurate analyses. |
True
|
complete_entry_only
|
bool
|
Whether to restrict results to complete provider entries. |
True
|
speed
|
int
|
Minimum or target speed constraint used by the space-weather query. |
0
|
half_angle
|
int
|
Half-angle constraint used by the space-weather query. |
0
|
keyword
|
str
|
Keyword used to filter provider records. |
''
|
api_key
|
str | None
|
Optional credential override used for the active request. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_astro_catalog ¶
fetch_astro_catalog(
mode: str = "object_query",
query: str = "",
quantity: str = "",
attributes: str = "",
arguments: str = "",
ra: str = "",
dec: str = "",
radius: int = 2,
data_format: str = "json",
time: int = 20,
) -> Any
Retrieve Open Astronomy Catalog queries.
Purpose
Retrieve Open Astronomy Catalog queries through Open Astronomy Catalog. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'object_query'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
quantity
|
str
|
Provider quantity or field requested from the catalog. |
''
|
attributes
|
str
|
Provider attributes requested for matching catalog records. |
''
|
arguments
|
str
|
Keyword arguments passed to the bound callable. |
''
|
ra
|
str
|
Right ascension value. |
''
|
dec
|
str
|
Declination value. |
''
|
radius
|
int
|
Search radius in the units specified by the operation. |
2
|
data_format
|
str
|
Provider output data format. |
'json'
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Provider-specific structured data produced by the retrieval operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_astro_query ¶
fetch_astro_query(
mode: str = "object_search",
query: str = "",
ra: str = "",
dec: str = "",
radius: float = 0.5,
radius_unit: str = "deg",
row_limit: int = 100,
) -> Any
Retrieve Simbad and astronomy object search operations.
Purpose
Retrieve Simbad and astronomy object search operations through Astroquery/SIMBAD. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'object_search'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
ra
|
str
|
Right ascension value. |
''
|
dec
|
str
|
Declination value. |
''
|
radius
|
float
|
Search radius in the units specified by the operation. |
0.5
|
radius_unit
|
str
|
Unit applied to the search radius. |
'deg'
|
row_limit
|
int
|
Maximum number of rows returned by the astronomy query. |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_star_map ¶
fetch_star_map(
mode: str = "object_link",
query: str = "",
ra: float = 0.0,
dec: float = 0.0,
zoom: int = 5,
image_source: str = "DSS2",
box_color: str = "yellow",
show_box: bool = True,
show_grid: bool = True,
show_lines: bool = True,
show_boundaries: bool = True,
show_const_names: bool = False,
time: int = 20,
) -> Any
Retrieve astronomical object map links and imagery.
Purpose
Retrieve astronomical object map links and imagery through astronomical map service. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'object_link'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
ra
|
float
|
Right ascension value. |
0.0
|
dec
|
float
|
Declination value. |
0.0
|
zoom
|
int
|
Map or chart zoom level. |
5
|
image_source
|
str
|
Imagery or survey source used to render the map or chart. |
'DSS2'
|
box_color
|
str
|
Color used to draw the target box on generated map or chart output. |
'yellow'
|
show_box
|
bool
|
Whether to display box in generated output. |
True
|
show_grid
|
bool
|
Whether to display grid in generated output. |
True
|
show_lines
|
bool
|
Whether to display lines in generated output. |
True
|
show_boundaries
|
bool
|
Whether to display boundaries in generated output. |
True
|
show_const_names
|
bool
|
Whether to display const names in generated output. |
False
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_star_chart ¶
fetch_star_chart(
mode: str = "object_chart",
query: str = "",
ra: float = 0.0,
dec: float = 0.0,
zoom: int = 5,
image_source: str = "DSS2",
box_color: str = "yellow",
show_box: bool = True,
show_grid: bool = True,
show_lines: bool = True,
show_boundaries: bool = True,
show_const_names: bool = False,
width: int = 900,
height: int = 450,
magnitude: float = 7.5,
time: int = 20,
) -> Any
Retrieve static star chart and coordinate chart generation.
Purpose
Retrieve static star chart and coordinate chart generation through astronomical chart service. The query text determines the records or documents matched by the provider.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'object_chart'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
ra
|
float
|
Right ascension value. |
0.0
|
dec
|
float
|
Declination value. |
0.0
|
zoom
|
int
|
Map or chart zoom level. |
5
|
image_source
|
str
|
Imagery or survey source used to render the map or chart. |
'DSS2'
|
box_color
|
str
|
Color used to draw the target box on generated map or chart output. |
'yellow'
|
show_box
|
bool
|
Whether to display box in generated output. |
True
|
show_grid
|
bool
|
Whether to display grid in generated output. |
True
|
show_lines
|
bool
|
Whether to display lines in generated output. |
True
|
show_boundaries
|
bool
|
Whether to display boundaries in generated output. |
True
|
show_const_names
|
bool
|
Whether to display const names in generated output. |
False
|
width
|
int
|
Output image or chart width in pixels. |
900
|
height
|
int
|
Output image or chart height in pixels. |
450
|
magnitude
|
float
|
Limiting stellar magnitude used when rendering a chart. |
7.5
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_open_sky ¶
fetch_open_sky(
mode: str = "states_bbox",
icao24: str = "",
airport: str = "",
begin: int | None = None,
end: int | None = None,
time_value: int | None = None,
lamin: float | None = None,
lomin: float | None = None,
lamax: float | None = None,
lomax: float | None = None,
extended: bool = False,
client_id: str = None,
client_secret: str = None,
time: int = 20,
) -> Any
Retrieve OpenSky Network aircraft, airport, and state-vector data.
Purpose
Retrieve OpenSky Network aircraft, airport, and state-vector data through OpenSky Network. Use mode to select among arrivals_airport, departures_airport, flights_aircraft, states_bbox, track_aircraft.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'states_bbox'
|
icao24
|
str
|
24-bit ICAO aircraft transponder address. |
''
|
airport
|
str
|
ICAO airport identifier used to query arrivals or departures. |
''
|
begin
|
int | None
|
Beginning Unix timestamp for the requested aviation interval. |
None
|
end
|
int | None
|
Ending Unix timestamp for the requested aviation interval. |
None
|
time_value
|
int | None
|
Clock time or timestamp used by the selected provider operation. |
None
|
lamin
|
float | None
|
Bounding-box minimum latitude in decimal degrees. |
None
|
lomin
|
float | None
|
Bounding-box minimum longitude in decimal degrees. |
None
|
lamax
|
float | None
|
Bounding-box maximum latitude in decimal degrees. |
None
|
lomax
|
float | None
|
Bounding-box maximum longitude in decimal degrees. |
None
|
extended
|
bool
|
Whether extended OpenSky state-vector fields should be requested. |
False
|
client_id
|
str
|
Optional credential override used for the active request. |
None
|
client_secret
|
str
|
Optional credential override used for the active request. |
None
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_google_drive_file ¶
Load a Google Drive file.
Purpose
Load a Google Drive file using the Google Drive loader. Boolean options control retrieval depth or supplemental content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_id
|
str
|
Provider file identifier used to load a single file. |
required |
recursive
|
bool
|
Whether the loader should traverse nested provider or URL resources. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_google_drive_folder ¶
Load documents from a Google Drive folder.
Purpose
Load documents from a Google Drive folder using the Google Drive loader. Boolean options control retrieval depth or supplemental content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder_id
|
str
|
Provider folder identifier used to load folder contents. |
required |
recursive
|
bool
|
Whether the loader should traverse nested provider or URL resources. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_onedrive ¶
load_onedrive(
drive_id: str,
folder_path: Optional[str] = None,
object_ids: Optional[List[str]] = None,
auth_with_token: bool = True,
) -> Any
Load documents from OneDrive.
Purpose
Load documents from OneDrive using the OneDrive loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
drive_id
|
str
|
OneDrive drive identifier. |
required |
folder_path
|
Optional[str]
|
Optional folder path within the selected drive. |
None
|
object_ids
|
Optional[List[str]]
|
Optional provider object identifiers to load. |
None
|
auth_with_token
|
bool
|
Whether token-based authentication should be used. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_google_cloud_file ¶
Load a Google Cloud Storage object.
Purpose
Load a Google Cloud Storage object using the Google Cloud Storage loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name
|
str
|
Google Cloud project name used by the storage loader. |
required |
bucket
|
str
|
Storage bucket name. |
required |
blob
|
str
|
Cloud storage object name. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_aws_file ¶
load_aws_file(
bucket: str,
key: str,
aws_access_key_id: Optional[str] = None,
aws_secret_access_key: Optional[str] = None,
aws_session_token: Optional[str] = None,
region_name: Optional[str] = None,
) -> Any
Load an Amazon S3 object.
Purpose
Load an Amazon S3 object using the Amazon S3 file loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket
|
str
|
Storage bucket name. |
required |
key
|
str
|
Amazon S3 object key. |
required |
aws_access_key_id
|
Optional[str]
|
Provider identifier for the selected aws access key. |
None
|
aws_secret_access_key
|
Optional[str]
|
AWS credential or configuration value for secret access key. |
None
|
aws_session_token
|
Optional[str]
|
AWS credential or configuration value for session token. |
None
|
region_name
|
Optional[str]
|
Cloud region name used to configure the storage client. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_google_speech_to_text ¶
load_google_speech_to_text(
project_id: str,
file_path: str,
config: Optional[Dict[str, Any]] = None,
) -> Any
Transcribe audio with Google Speech-to-Text.
Purpose
Transcribe audio with Google Speech-to-Text using the Google Speech-to-Text loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_id
|
str
|
Google Cloud project identifier used by the speech loader. |
required |
file_path
|
str
|
Local filesystem path to the source file. |
required |
config
|
Optional[Dict[str, Any]]
|
Optional provider configuration mapping. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. the project error type. |
Source code in gemini\tools.py
load_google_bucket ¶
load_google_bucket(
project_name: str,
bucket: str,
prefix: Optional[str] = None,
continue_on_failure: bool = False,
) -> Any
Load documents from a Google Cloud Storage bucket.
Purpose
Load documents from a Google Cloud Storage bucket using the Google Cloud Storage bucket loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_name
|
str
|
Google Cloud project name used by the storage loader. |
required |
bucket
|
str
|
Storage bucket name. |
required |
prefix
|
Optional[str]
|
Optional object-name prefix used to restrict cloud storage results. |
None
|
continue_on_failure
|
bool
|
Whether loading should continue when an individual object fails. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_aws_bucket ¶
load_aws_bucket(
bucket: str,
prefix: Optional[str] = None,
aws_access_key_id: Optional[str] = None,
aws_secret_access_key: Optional[str] = None,
aws_session_token: Optional[str] = None,
region_name: Optional[str] = None,
endpoint_url: Optional[str] = None,
) -> Any
Load documents from an Amazon S3 bucket.
Purpose
Load documents from an Amazon S3 bucket using the Amazon S3 bucket loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bucket
|
str
|
Storage bucket name. |
required |
prefix
|
Optional[str]
|
Optional object-name prefix used to restrict cloud storage results. |
None
|
aws_access_key_id
|
Optional[str]
|
Provider identifier for the selected aws access key. |
None
|
aws_secret_access_key
|
Optional[str]
|
AWS credential or configuration value for secret access key. |
None
|
aws_session_token
|
Optional[str]
|
AWS credential or configuration value for session token. |
None
|
region_name
|
Optional[str]
|
Cloud region name used to configure the storage client. |
None
|
endpoint_url
|
Optional[str]
|
Optional alternate service endpoint URL. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_census_data ¶
fetch_census_data(
mode: str = "variables",
year: str = "2022",
dataset: str = "acs/acs5",
fields: str = "NAME,B01001_001E",
geography_for: str = "state:*",
geography_in: str = "",
predicates: str = "",
time: int = 20,
) -> Any
Retrieve U.S. Census dataset and variable.
Purpose
Retrieve U.S. Census dataset and variable through U.S. Census API. Use mode to select among data, variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'variables'
|
year
|
str
|
Dataset or observation year requested from the provider. |
'2022'
|
dataset
|
str
|
Provider dataset name or identifier. |
'acs/acs5'
|
fields
|
str
|
Comma-separated or provider-specific field selection. |
'NAME,B01001_001E'
|
geography_for
|
str
|
Census |
'state:*'
|
geography_in
|
str
|
Optional Census |
''
|
predicates
|
str
|
Additional Census query predicates appended to the request. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_socrata ¶
fetch_socrata(
mode: str = "rows",
domain: str = "data.cdc.gov",
dataset_id: str = "",
select: str = "",
where: str = "",
order: str = "",
group: str = "",
limit: int = 25,
offset: int = 0,
time: int = 20,
) -> Any
Retrieve Socrata dataset metadata and row.
Purpose
Retrieve Socrata dataset metadata and row through Socrata. Use mode to select among metadata, rows. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'rows'
|
domain
|
str
|
Provider domain or host containing the requested dataset. |
'data.cdc.gov'
|
dataset_id
|
str
|
Provider dataset identifier. |
''
|
select
|
str
|
Socrata |
''
|
where
|
str
|
Socrata |
''
|
order
|
str
|
Provider-supported result ordering expression. |
''
|
group
|
str
|
Socrata |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_united_nations ¶
Retrieve United Nations SDMX dataset and query.
Purpose
Retrieve United Nations SDMX dataset and query through United Nations SDMX service. Use mode to select among datasets, sdmx_query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'datasets'
|
query_path
|
str
|
Path identifying the query resource. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_world_population ¶
fetch_world_population(
mode: str = "catalog",
query: str = "",
asset_path: str = "",
page: int = 1,
page_size: int = 25,
time: int = 20,
) -> Any
Retrieve WorldPop catalog and raster metadata.
Purpose
Retrieve WorldPop catalog and raster metadata through WorldPop. Use mode to select among catalog, raster_metadata, search. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'catalog'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
asset_path
|
str
|
Path identifying the asset resource. |
''
|
page
|
int
|
One-based result page to request. |
1
|
page_size
|
int
|
Maximum number of records requested per page. |
25
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_open_city ¶
Load an Open City dataset.
Purpose
Load an Open City dataset using the Open City Data loader. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
city_id
|
str
|
Provider identifier for the selected city. |
required |
dataset_id
|
str
|
Provider dataset identifier. |
required |
limit
|
int
|
Maximum number of records requested from the backing source. |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
ValueError
|
Raised when a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_text ¶
Load a plain-text file.
Purpose
Load a plain-text file using the text loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
encoding
|
Optional[str]
|
Optional file encoding passed to the backing loader. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_csv ¶
load_csv(
path: str,
encoding: Optional[str] = "utf-8",
source_column: Optional[str] = None,
delimiter: str = ",",
quotechar: str = '"',
) -> Any
Load a CSV file.
Purpose
Load a CSV file using the CSV loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
encoding
|
Optional[str]
|
Optional file encoding passed to the backing loader. |
'utf-8'
|
source_column
|
Optional[str]
|
Optional CSV column whose value is stored as the document source. |
None
|
delimiter
|
str
|
Field delimiter used to parse delimited text. |
','
|
quotechar
|
str
|
Quote character used to parse delimited text. |
'"'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
read_pdf ¶
Read a PDF file.
Purpose
Read a PDF file using the PDF reader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'single'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_pdf ¶
load_pdf(
path: str,
mode: str = "single",
extract: str = "plain",
include: bool = False,
format: str = "markdown-img",
size: int = 1000,
overlap: int = 150,
has_tables: bool = True,
) -> Any
Load and extract a PDF file.
Purpose
Load and extract a PDF file using the PDF loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'single'
|
extract
|
str
|
PDF text-extraction strategy used by the underlying parser. |
'plain'
|
include
|
bool
|
Whether optional embedded content should be included. |
False
|
format
|
str
|
Output or embedded-image format requested from the loader. |
'markdown-img'
|
size
|
int
|
Maximum chunk size used for document splitting. |
1000
|
overlap
|
int
|
Number of characters or tokens repeated between adjacent chunks. |
150
|
has_tables
|
bool
|
Whether table-aware parsing or extraction should be enabled. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_excel ¶
Load an Excel workbook.
Purpose
Load an Excel workbook using the Excel loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'elements'
|
has_headers
|
bool
|
Whether the first spreadsheet row should be treated as column headers. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_word ¶
Load a Word document.
Purpose
Load a Word document using the Word loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_markdown ¶
Load a Markdown document.
Purpose
Load a Markdown document using the Markdown loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_html ¶
Load an HTML document.
Purpose
Load an HTML document using the HTML loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_outlook ¶
Load an Outlook message.
Purpose
Load an Outlook message using the Outlook message loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_spfx ¶
Load a SharePoint document library.
Purpose
Load a SharePoint document library using the SharePoint loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
library_id
|
str
|
SharePoint document-library identifier. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_spfx_folder ¶
Load a SharePoint folder.
Purpose
Load a SharePoint folder using the SharePoint loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
library_id
|
str
|
SharePoint document-library identifier. |
required |
folder_id
|
str
|
Provider folder identifier used to load folder contents. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_powerpoint ¶
Load a PowerPoint presentation.
Purpose
Load a PowerPoint presentation using the PowerPoint loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'single'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_powerpoint_multiple ¶
Load multiple PowerPoint presentation elements.
Purpose
Load multiple PowerPoint presentation elements using the PowerPoint loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_email ¶
Load an email message.
Purpose
Load an email message using the email loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'single'
|
attachments
|
bool
|
Whether email attachments should be included when supported. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_json ¶
Load JSON content.
Purpose
Load JSON content using the JSON loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local file path used by the loader. |
required |
is_text
|
bool
|
Whether JSON values should be treated as text content. |
True
|
is_lines
|
bool
|
Whether the JSON source uses JSON Lines format. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_xml ¶
Load an XML document.
Purpose
Load an XML document using the XML loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_xml_tree ¶
Parse an XML document tree.
Purpose
Parse an XML document tree using the XML loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local file path used by the loader. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
XML elements matching the requested XPath expression. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
load_jupyter_notebook ¶
load_jupyter_notebook(
path: str,
include_outputs: bool = False,
max_output_length: int = 10,
remove_newline: bool = False,
traceback: bool = False,
) -> Any
Load a Jupyter notebook.
Purpose
Load a Jupyter notebook using the Jupyter notebook loader. Boolean options control retrieval depth or supplemental content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local file path used by the loader. |
required |
include_outputs
|
bool
|
Whether notebook cell outputs should be included. |
False
|
max_output_length
|
int
|
Maximum notebook cell output length to retain. |
10
|
remove_newline
|
bool
|
Whether newline characters should be removed from notebook output. |
False
|
traceback
|
bool
|
Whether notebook traceback output should be included. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
LangChain documents loaded from the requested source. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_weather_current ¶
fetch_google_weather_current(
address: str,
units_system: str = "METRIC",
language_code: str = "en",
time: int = 10,
) -> Any
Retrieve google weather current data.
Purpose
Retrieve google weather current data through Google Weather.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
units_system
|
str
|
Measurement unit system requested from the provider. |
'METRIC'
|
language_code
|
str
|
BCP-47-style language code used for provider results. |
'en'
|
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_weather_hourly_forecast ¶
fetch_google_weather_hourly_forecast(
address: str,
hours: int = 24,
units_system: str = "METRIC",
language_code: str = "en",
time: int = 10,
) -> Any
Retrieve hourly forecast.
Purpose
Retrieve hourly forecast through Google Weather.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
hours
|
int
|
Number of hourly observations or forecast periods to request. |
24
|
units_system
|
str
|
Measurement unit system requested from the provider. |
'METRIC'
|
language_code
|
str
|
BCP-47-style language code used for provider results. |
'en'
|
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_weather_daily_forecast ¶
fetch_google_weather_daily_forecast(
address: str,
days: int = 5,
units_system: str = "METRIC",
language_code: str = "en",
time: int = 10,
) -> Any
Retrieve daily forecast.
Purpose
Retrieve daily forecast through Google Weather.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
days
|
int
|
Number of calendar days included in the requested interval. |
5
|
units_system
|
str
|
Measurement unit system requested from the provider. |
'METRIC'
|
language_code
|
str
|
BCP-47-style language code used for provider results. |
'en'
|
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_weather_hourly_history ¶
fetch_google_weather_hourly_history(
address: str,
hours: int = 24,
units_system: str = "METRIC",
language_code: str = "en",
time: int = 10,
) -> Any
Retrieve hourly history.
Purpose
Retrieve hourly history through Google Weather.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
hours
|
int
|
Number of hourly observations or forecast periods to request. |
24
|
units_system
|
str
|
Measurement unit system requested from the provider. |
'METRIC'
|
language_code
|
str
|
BCP-47-style language code used for provider results. |
'en'
|
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_weather_alerts ¶
Retrieve google weather alerts data.
Purpose
Retrieve google weather alerts data through Google Weather.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
language_code
|
str
|
BCP-47-style language code used for provider results. |
'en'
|
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_earth_observatory ¶
fetch_earth_observatory(
mode: str = "events",
status: str = "open",
category: str = "",
source: str = "",
limit: int = 20,
days: int = 30,
start_date: str = "",
end_date: str = "",
time: int = 20,
) -> Any
Retrieve NASA EONET events, categories, sources, and layers.
Purpose
Retrieve NASA EONET events, categories, sources, and layers through NASA EONET. Date and time arguments constrain the requested interval when supplied. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'events'
|
status
|
str
|
Provider status filter applied to returned records. |
'open'
|
category
|
str
|
Optional logical category retained in tool metadata. |
''
|
source
|
str
|
Provider source identifier used to restrict or classify results. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
20
|
days
|
int
|
Number of calendar days included in the requested interval. |
30
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_open_weather ¶
fetch_open_weather(
location: str,
mode: str = "current",
zone: str = "auto",
forecast_days: int = 7,
past_days: int = 0,
count: int = 10,
) -> Any
Retrieve Open-Meteo current and forecast weather.
Purpose
Retrieve Open-Meteo current and forecast weather through Open-Meteo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
str
|
Place name, address, or location description resolved by the provider. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'current'
|
zone
|
str
|
Timezone identifier or automatic timezone-selection mode. |
'auto'
|
forecast_days
|
int
|
Number of forecast days to request. |
7
|
past_days
|
int
|
Number of historical days to include with the weather request. |
0
|
count
|
int
|
Maximum number of matching locations or records to consider. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_historical_weather ¶
Retrieve historical weather archive.
Purpose
Retrieve historical weather archive through Open-Meteo Archive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
str
|
Place name, address, or location description resolved by the provider. |
required |
date
|
date
|
Date used by the provider or processing operation. |
required |
zone
|
str
|
Timezone identifier or automatic timezone-selection mode. |
'auto'
|
count
|
int
|
Maximum number of matching locations or records to consider. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_usgs_earthquakes ¶
fetch_usgs_earthquakes(
mode: str = "feed",
feed: str = "all_day.geojson",
start_date: str = "",
end_date: str = "",
min_magnitude: float = 1.0,
max_magnitude: float = 10.0,
limit: int = 25,
order_by: str = "time",
event_type: str = "earthquake",
latitude: float | None = None,
longitude: float | None = None,
max_radius_km: float | None = None,
time: int = 20,
) -> Any
Retrieve USGS earthquake feed and query.
Purpose
Retrieve USGS earthquake feed and query through USGS Earthquake Hazards Program. Use mode to select among feed, search. Date and time arguments constrain the requested interval when supplied. Coordinate and bounding arguments constrain geographic scope when supported. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'feed'
|
feed
|
str
|
Predefined USGS earthquake feed name used when feed mode is selected. |
'all_day.geojson'
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
min_magnitude
|
float
|
Minimum earthquake magnitude to include in the result set. |
1.0
|
max_magnitude
|
float
|
Maximum earthquake magnitude to include in the result set. |
10.0
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
order_by
|
str
|
Provider-supported field used to order results. |
'time'
|
event_type
|
str
|
USGS event type to include; |
'earthquake'
|
latitude
|
float | None
|
Latitude in decimal degrees. |
None
|
longitude
|
float | None
|
Longitude in decimal degrees. |
None
|
max_radius_km
|
float | None
|
Maximum geographic search radius in kilometers. |
None
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_usgs_water_data ¶
fetch_usgs_water_data(
mode: str = "monitoring-locations",
monitoring_location_id: str = "",
state_code: str = "",
county_code: str = "",
site_type: str = "",
parameter_code: str = "",
limit: int = 25,
time: int = 20,
) -> Any
Retrieve USGS water services records.
Purpose
Retrieve USGS water services records through USGS Water Data. Use mode to select among latest-continuous, latest-daily, monitoring-locations, time-series-metadata. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'monitoring-locations'
|
monitoring_location_id
|
str
|
USGS monitoring-location identifier used to target a specific site. |
''
|
state_code
|
str
|
State code used to restrict provider records. |
''
|
county_code
|
str
|
County code used to restrict provider records. |
''
|
site_type
|
str
|
USGS site-type code used to restrict monitoring locations. |
''
|
parameter_code
|
str
|
USGS parameter code identifying the measured property. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_air_now ¶
fetch_air_now(
mode: str = "current-zip",
zip_code: str = "",
latitude: float | None = None,
longitude: float | None = None,
date: str = "",
distance: int = 25,
time: int = 20,
) -> Any
Retrieve AirNow current and forecast air quality data.
Purpose
Retrieve AirNow current and forecast air quality data through AirNow. Use mode to select among current-latlon, current-zip, forecast-latlon, forecast-zip. Coordinate and bounding arguments constrain geographic scope when supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'current-zip'
|
zip_code
|
str
|
Provider code identifying or filtering zip. |
''
|
latitude
|
float | None
|
Latitude in decimal degrees. |
None
|
longitude
|
float | None
|
Longitude in decimal degrees. |
None
|
date
|
str
|
Date used by the provider or processing operation. |
''
|
distance
|
int
|
Maximum provider search distance, using the units defined by that service. |
25
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_climate_data ¶
fetch_climate_data(
mode: str = "datasets",
keyword: str = "",
dataset: str = "",
start_date: str = "",
end_date: str = "",
stations: str = "",
data_types: str = "",
limit: int = 25,
offset: int = 0,
time: int = 20,
) -> Any
Retrieve NOAA climate dataset and data records.
Purpose
Retrieve NOAA climate dataset and data records through NOAA climate services. Use mode to select among data, datasets. Date and time arguments constrain the requested interval when supplied. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'datasets'
|
keyword
|
str
|
Keyword used to filter provider records. |
''
|
dataset
|
str
|
Provider dataset name or identifier. |
''
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
stations
|
str
|
Station identifiers used to restrict climate observations. |
''
|
data_types
|
str
|
Climate data-type identifiers requested from the provider. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_eonet ¶
fetch_eonet(
mode: str = "events",
source: str = "",
category: str = "",
status: str = "open",
limit: int = 25,
days: int = 30,
start_date: str = "",
end_date: str = "",
bbox: str = "",
time: int = 20,
) -> Any
Retrieve NASA EONET environmental event data.
Purpose
Retrieve NASA EONET environmental event data through NASA EONET. Use mode to select among categories, events. Date and time arguments constrain the requested interval when supplied. Coordinate and bounding arguments constrain geographic scope when supported. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'events'
|
source
|
str
|
Provider source identifier used to restrict or classify results. |
''
|
category
|
str
|
Optional logical category retained in tool metadata. |
''
|
status
|
str
|
Provider status filter applied to returned records. |
'open'
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
days
|
int
|
Number of calendar days included in the requested interval. |
30
|
start_date
|
str
|
Inclusive start date for the requested time range, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
bbox
|
str
|
Bounding box defining the geographic extent of the request. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_envirofacts ¶
fetch_envirofacts(
table_name: str = "TRI_FACILITY",
state_code: str = "",
facility_name: str = "",
limit: int = 25,
time: int = 20,
) -> Any
Retrieve EPA Envirofacts table and facility records.
Purpose
Retrieve EPA Envirofacts table and facility records through EPA Envirofacts. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
table_name
|
str
|
Envirofacts table or resource name to query. |
'TRI_FACILITY'
|
state_code
|
str
|
State code used to restrict provider records. |
''
|
facility_name
|
str
|
Facility-name filter applied to Envirofacts records. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_tides_and_currents ¶
fetch_tides_and_currents(
mode: str = "water-level",
station_id: str = "",
begin_date: str = "",
end_date: str = "",
datum: str = "MLLW",
units: str = "metric",
time_zone: str = "gmt",
interval: str = "hilo",
time: int = 20,
) -> Any
Retrieve NOAA tides, currents, and station data.
Purpose
Retrieve NOAA tides, currents, and station data through NOAA Tides & Currents. Use mode to select among station, tide-predictions, water-level. Date and time arguments constrain the requested interval when supplied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'water-level'
|
station_id
|
str
|
Provider identifier for the selected station. |
''
|
begin_date
|
str
|
Beginning date for the requested interval, in the provider-supported format. |
''
|
end_date
|
str
|
Inclusive end date for the requested time range, in the provider-supported format. |
''
|
datum
|
str
|
Vertical datum used for tide or water-level measurements. |
'MLLW'
|
units
|
str
|
Unit system used for returned measurements. |
'metric'
|
time_zone
|
str
|
Timezone used for returned tide or current timestamps. |
'gmt'
|
interval
|
str
|
Provider sampling or reporting interval. |
'hilo'
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_uv_index ¶
fetch_uv_index(
mode: str = "daily-zip",
zip_code: str = "",
city: str = "",
state: str = "",
time: int = 20,
) -> Any
Retrieve EPA UV Index current and forecast data.
Purpose
Retrieve EPA UV Index current and forecast data through EPA UV Index. Use mode to select among daily-city-state, daily-zip, hourly-city-state, hourly-zip.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'daily-zip'
|
zip_code
|
str
|
Provider code identifying or filtering zip. |
''
|
city
|
str
|
City name used to locate or filter provider records. |
''
|
state
|
str
|
State name or abbreviation used to locate or filter provider records. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_purple_air ¶
fetch_purple_air(
mode: str = "sensors",
sensor_index: int | None = None,
nwlng: float | None = None,
nwlat: float | None = None,
selng: float | None = None,
selat: float | None = None,
location_type: int = 0,
max_age: int = 0,
modified_since: int = 0,
fields: str = "",
time: int = 20,
) -> Any
Retrieve PurpleAir sensor and air quality records.
Purpose
Retrieve PurpleAir sensor and air quality records through PurpleAir. Use mode to select among sensor, sensors. Coordinate and bounding arguments constrain geographic scope when supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'sensors'
|
sensor_index
|
int | None
|
PurpleAir sensor identifier. |
None
|
nwlng
|
float | None
|
Northwest bounding-box longitude in decimal degrees. |
None
|
nwlat
|
float | None
|
Northwest bounding-box latitude in decimal degrees. |
None
|
selng
|
float | None
|
Southeast bounding-box longitude in decimal degrees. |
None
|
selat
|
float | None
|
Southeast bounding-box latitude in decimal degrees. |
None
|
location_type
|
int
|
Provider type selector for location. |
0
|
max_age
|
int
|
Maximum age permitted by the operation. |
0
|
modified_since
|
int
|
Unix timestamp used to return PurpleAir sensors modified after the specified time. |
0
|
fields
|
str
|
Comma-separated or provider-specific field selection. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_open_aq ¶
fetch_open_aq(
mode: str = "locations",
location_id: int | None = None,
parameter_id: int | None = None,
country_id: int | None = None,
coordinates: str = "",
radius: int = 25000,
providers_id: str = "",
parameters_id: str = "",
limit: int = 25,
page: int = 1,
time: int = 20,
) -> Any
Retrieve OpenAQ location, measurement, and air-quality records.
Purpose
Retrieve OpenAQ location, measurement, and air-quality records through OpenAQ. Use mode to select among countries, latest, locations, parameter_latest, parameters, providers. Coordinate and bounding arguments constrain geographic scope when supported. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'locations'
|
location_id
|
int | None
|
Provider identifier for the selected location. |
None
|
parameter_id
|
int | None
|
Provider identifier for the selected parameter. |
None
|
country_id
|
int | None
|
Provider identifier for the selected country. |
None
|
coordinates
|
str
|
Latitude/longitude coordinate string used by the provider. |
''
|
radius
|
int
|
Search radius in the units specified by the operation. |
25000
|
providers_id
|
str
|
Provider identifier for the selected providers. |
''
|
parameters_id
|
str
|
Provider identifier for the selected parameters. |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
page
|
int
|
One-based result page to request. |
1
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_firms ¶
fetch_firms(
mode: str = "area",
source: str = "VIIRS_SNPP_NRT",
area_coordinates: str = "world",
day_range: int = 1,
date: str = "",
sensor: str = "ALL",
time: int = 20,
) -> Any
Retrieve NASA FIRMS active fire data.
Purpose
Retrieve NASA FIRMS active fire data through NASA FIRMS. Use mode to select among area, data-availability.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'area'
|
source
|
str
|
Provider source identifier used to restrict or classify results. |
'VIIRS_SNPP_NRT'
|
area_coordinates
|
str
|
FIRMS area-of-interest coordinates or |
'world'
|
day_range
|
int
|
Number of days included in the FIRMS active-fire request. |
1
|
date
|
str
|
Date used by the provider or processing operation. |
''
|
sensor
|
str
|
Sensor or instrument filter applied to provider results. |
'ALL'
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
geocode_location ¶
Geocode location.
Purpose
Geocode location using Google Maps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
str
|
Street address or place description used for geocoding, validation, or routing. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Latitude and longitude coordinate pair. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
geocode_coordinates ¶
Geocode coordinates.
Purpose
Geocode coordinates using Google Maps. Coordinate and bounding arguments constrain geographic scope when supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lat
|
float
|
Latitude in decimal degrees. |
required |
long
|
float
|
Longitude in decimal degrees. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Text produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
validate_address ¶
Validate address.
Purpose
Validate address using Google Maps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
List[str]
|
Street address or place description used for geocoding, validation, or routing. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If a supplied value has an unsupported type. |
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
request_directions ¶
Request directions.
Purpose
Request directions using Google Maps.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
origin
|
str
|
Starting address or place for a routing request. |
required |
destination
|
str
|
Destination address or place for a routing request. |
required |
mode
|
str
|
Operation mode used to select the provider or processing workflow. |
'driving'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_global_imagery_wms_map ¶
fetch_global_imagery_wms_map(
layer: str,
image_date: str,
bbox: Tuple[float, float, float, float],
width: int = 1200,
height: int = 600,
projection: str = "epsg4326",
quality: str = "best",
image_format: str = "image/png",
transparent: bool = True,
output_dir: str = "python-examples",
output_name: str = "",
time: int = 20,
) -> Any
Retrieve a WMS imagery map.
Purpose
Retrieve a WMS imagery map through NASA Global Imagery Browse Services. Coordinate and bounding arguments constrain geographic scope when supported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layer
|
str
|
Map or imagery layer identifier. |
required |
image_date
|
str
|
Observation date used to select imagery. |
required |
bbox
|
Tuple[float, float, float, float]
|
Bounding box defining the geographic extent of the request. |
required |
width
|
int
|
Output image or chart width in pixels. |
1200
|
height
|
int
|
Output image or chart height in pixels. |
600
|
projection
|
str
|
Coordinate reference system used for rendered imagery. |
'epsg4326'
|
quality
|
str
|
Imagery quality level requested from the mapping service. |
'best'
|
image_format
|
str
|
Output format requested for image. |
'image/png'
|
transparent
|
bool
|
Whether the generated map image should use a transparent background. |
True
|
output_dir
|
str
|
Local directory where generated imagery is written. |
'python-examples'
|
output_name
|
str
|
Optional filename for generated imagery. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_global_imagery_map_services ¶
Retrieve available imagery map services.
Purpose
Retrieve available imagery map services through NASA Global Imagery Browse Services.
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_global_imagery_mercator_map ¶
Render a Mercator imagery map.
Purpose
Render a Mercator imagery map through NASA Global Imagery Browse Services.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ccrs
|
Any | None
|
Optional Cartopy coordinate reference system used to construct the map. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_google_geocoding ¶
fetch_google_geocoding(
mode: str = "forward",
query: str = "",
latitude: float = 0.0,
longitude: float = 0.0,
place_id: str = "",
language: str = "en",
region: str = "",
result_type: str = "",
location_type: str = "",
time: int = 10,
api_key: Optional[str] = None,
) -> Any
Retrieve Google forward, reverse, and place geocoding.
Purpose
Retrieve Google forward, reverse, and place geocoding through Google Geocoding. Use mode to select among forward, place, reverse. The query text determines the records or documents matched by the provider. Coordinate and bounding arguments constrain geographic scope when supported. When supplied, api_key overrides the configured provider credential for this request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'forward'
|
query
|
str
|
Search text, lookup value, or provider query submitted by the caller. |
''
|
latitude
|
float
|
Latitude in decimal degrees. |
0.0
|
longitude
|
float
|
Longitude in decimal degrees. |
0.0
|
place_id
|
str
|
Provider identifier for the selected place. |
''
|
language
|
str
|
Language code used for provider results or parsing. |
'en'
|
region
|
str
|
Provider region filter or regional bias value. |
''
|
result_type
|
str
|
Provider type selector for result. |
''
|
location_type
|
str
|
Provider type selector for location. |
''
|
time
|
int
|
Request timeout in seconds. |
10
|
api_key
|
Optional[str]
|
Optional credential override used for the active request. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_usgs_national_map ¶
fetch_usgs_national_map(
mode: str = "products",
dataset: str = "",
q: str = "",
bbox: str = "",
prod_formats: str = "",
max_items: int = 25,
offset: int = 0,
time: int = 20,
) -> Any
Retrieve USGS National Map datasets and products.
Purpose
Retrieve USGS National Map datasets and products through USGS The National Map. Use mode to select among datasets, products. The query text determines the records or documents matched by the provider. Coordinate and bounding arguments constrain geographic scope when supported. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'products'
|
dataset
|
str
|
Provider dataset name or identifier. |
''
|
q
|
str
|
Free-text provider query used to search matching records. |
''
|
bbox
|
str
|
Bounding box defining the geographic extent of the request. |
''
|
prod_formats
|
str
|
Product-format filter applied to National Map results. |
''
|
max_items
|
int
|
Maximum number of records or items to return. |
25
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_usgs_sciencebase ¶
fetch_usgs_sciencebase(
mode: str = "items",
q: str = "",
item_id: str = "",
max_items: int = 25,
offset: int = 0,
fields: str = "",
time: int = 20,
) -> Any
Retrieve USGS ScienceBase items and catalog records.
Purpose
Retrieve USGS ScienceBase items and catalog records through USGS ScienceBase. Use mode to select among item, items. The query text determines the records or documents matched by the provider. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'items'
|
q
|
str
|
Free-text provider query used to search matching records. |
''
|
item_id
|
str
|
Provider identifier for the selected item. |
''
|
max_items
|
int
|
Maximum number of records or items to return. |
25
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
fields
|
str
|
Comma-separated or provider-specific field selection. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_health_data ¶
fetch_health_data(
mode: str = "rows",
domain: str = "healthdata.gov",
dataset_id: str = "",
select: str = "",
where: str = "",
order: str = "",
group: str = "",
limit: int = 25,
offset: int = 0,
time: int = 20,
) -> Any
Retrieve HealthData.gov Socrata metadata and rows.
Purpose
Retrieve HealthData.gov Socrata metadata and rows through HealthData.gov. Use mode to select among metadata, rows. Result-count arguments bound the amount of data requested.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation selector. Supported values detected in the implementation include |
'rows'
|
domain
|
str
|
Provider domain or host containing the requested dataset. |
'healthdata.gov'
|
dataset_id
|
str
|
Provider dataset identifier. |
''
|
select
|
str
|
Socrata |
''
|
where
|
str
|
Socrata |
''
|
order
|
str
|
Provider-supported result ordering expression. |
''
|
group
|
str
|
Socrata |
''
|
limit
|
int
|
Maximum number of records or items to return. |
25
|
offset
|
int
|
Zero-based result offset used for pagination. |
0
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Structured mapping produced by the operation. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required value is missing, blank, or outside the supported range. |
Error
|
If the implementation wraps a provider, parsing, filesystem, or processing failure in the project error type. |
Source code in gemini\tools.py
fetch_global_health_data ¶
fetch_global_health_data(
mode: str = "indicator_registry",
query_path: str = "",
fmt: str = "json",
time: int = 20,
) -> Any
Retrieve WHO global health indicator and Athena data.
Purpose
Retrieve WHO global health indicator and Athena data through WHO Global Health.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the backing workflow. |
'indicator_registry'
|
query_path
|
str
|
Query path value used by the operation. |
''
|
fmt
|
str
|
Fmt value used by the operation. |
'json'
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
fetch_wonder ¶
fetch_wonder(
mode: str = "metadata_template",
dataset_id: str = "D76",
request_xml: str = "",
time: int = 20,
) -> Any
Retrieve CDC WONDER template and query submission.
Purpose
Retrieve CDC WONDER template and query submission through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
str
|
Operation mode used to select the backing workflow. |
'metadata_template'
|
dataset_id
|
str
|
Dataset id value used by the operation. |
'D76'
|
request_xml
|
str
|
Request xml value used by the operation. |
''
|
time
|
int
|
Request timeout in seconds. |
20
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
load_pubmed ¶
Load PubMed research documents.
Purpose
Load PubMed research documents through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query or natural-language request submitted to the backing operation. |
required |
max_docs
|
int
|
Max docs value used by the operation. |
5
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
fetch_web_page ¶
Retrieve HTTP web page content and HTML extraction data.
Purpose
Retrieve HTTP web page content and HTML extraction data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
convert_html_to_text ¶
Convert HTML to plain text.
Purpose
Convert HTML to plain text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Html value used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
extract_web_title ¶
Extract a web title from supplied HTML content.
Purpose
Extract a web title from supplied HTML content through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Html value used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
extract_web_links ¶
Extract web links from supplied HTML content.
Purpose
Extract web links from supplied HTML content through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_url
|
str
|
Base url value used by the operation. |
required |
html
|
str
|
Html value used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
extract_web_structured_data ¶
extract_web_structured_data(
url: str,
html: str,
selected_methods: Optional[List[str]] = None,
) -> Any
Extract structured data from supplied HTML content.
Purpose
Extract structured data from supplied HTML content through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
html
|
str
|
Html value used by the operation. |
required |
selected_methods
|
Optional[List[str]]
|
Selected methods value used by the operation. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
crawl_web ¶
crawl_web(
seed_url: str,
include_title: bool = True,
include_basic_text: bool = True,
include_raw_html: bool = False,
selected_methods: Optional[List[str]] = None,
recursive: bool = False,
max_depth: int = 1,
max_pages: int = 10,
same_domain_only: bool = True,
request_timeout: int = 10,
delay_seconds: float = 0.25,
max_bytes: int = 1000000,
headers: Optional[Dict[str, str]] = None,
use_playwright: bool = False,
) -> Any
Crawl web pages from a seed URL.
Purpose
Crawl web pages from a seed URL through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seed_url
|
str
|
Seed url value used by the operation. |
required |
include_title
|
bool
|
Include title value used by the operation. |
True
|
include_basic_text
|
bool
|
Include basic text value used by the operation. |
True
|
include_raw_html
|
bool
|
Include raw html value used by the operation. |
False
|
selected_methods
|
Optional[List[str]]
|
Selected methods value used by the operation. |
None
|
recursive
|
bool
|
Whether nested resources should be traversed recursively. |
False
|
max_depth
|
int
|
Max depth value used by the operation. |
1
|
max_pages
|
int
|
Max pages value used by the operation. |
10
|
same_domain_only
|
bool
|
Same domain only value used by the operation. |
True
|
request_timeout
|
int
|
Request timeout value used by the operation. |
10
|
delay_seconds
|
float
|
Delay seconds value used by the operation. |
0.25
|
max_bytes
|
int
|
Max bytes value used by the operation. |
1000000
|
headers
|
Optional[Dict[str, str]]
|
Headers value used by the operation. |
None
|
use_playwright
|
bool
|
Use playwright value used by the operation. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_crawler_page ¶
scrape_crawler_page(
url: str,
include_title: bool = True,
include_basic_text: bool = True,
include_raw_html: bool = False,
selected_methods: Optional[List[str]] = None,
request_timeout: int = 10,
max_bytes: int = 1000000,
headers: Optional[Dict[str, str]] = None,
use_playwright: bool = False,
) -> Any
Extract a crawler page from an HTML page.
Purpose
Extract a crawler page from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
include_title
|
bool
|
Include title value used by the operation. |
True
|
include_basic_text
|
bool
|
Include basic text value used by the operation. |
True
|
include_raw_html
|
bool
|
Include raw html value used by the operation. |
False
|
selected_methods
|
Optional[List[str]]
|
Selected methods value used by the operation. |
None
|
request_timeout
|
int
|
Request timeout value used by the operation. |
10
|
max_bytes
|
int
|
Max bytes value used by the operation. |
1000000
|
headers
|
Optional[Dict[str, str]]
|
Headers value used by the operation. |
None
|
use_playwright
|
bool
|
Use playwright value used by the operation. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
render_web_page ¶
render_web_page(
url: str,
timeout: int = 15,
headers: Optional[Dict[str, str]] = None,
use_playwright: bool = False,
) -> Any
Render a dynamic web page with Playwright.
Purpose
Render a dynamic web page with Playwright through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
timeout
|
int
|
Maximum time in seconds to wait for the operation. |
15
|
headers
|
Optional[Dict[str, str]]
|
Headers value used by the operation. |
None
|
use_playwright
|
bool
|
Use playwright value used by the operation. |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
load_web ¶
load_web(
urls: str | List[str],
recursive: bool = False,
max_depth: int = 2,
prevent_outside: bool = True,
timeout: int = 10,
ignore: bool = True,
progress: bool = True,
) -> Any
Load web documents.
Purpose
Load web documents through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
urls
|
str | List[str]
|
Urls value used by the operation. |
required |
recursive
|
bool
|
Whether nested resources should be traversed recursively. |
False
|
max_depth
|
int
|
Max depth value used by the operation. |
2
|
prevent_outside
|
bool
|
Prevent outside value used by the operation. |
True
|
timeout
|
int
|
Maximum time in seconds to wait for the operation. |
10
|
ignore
|
bool
|
Ignore value used by the operation. |
True
|
progress
|
bool
|
Progress value used by the operation. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
load_web_recursive ¶
Recursively load web documents.
Purpose
Recursively load web documents through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
depth
|
int
|
Depth value used by the operation. |
2
|
max_time
|
int
|
Max time value used by the operation. |
10
|
ignore
|
bool
|
Ignore value used by the operation. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
load_web_pages ¶
load_web_pages(
urls: List[str],
depth: int = 2,
timeout: int = 10,
ignore: bool = True,
progress: bool = True,
) -> Any
Load static web pages.
Purpose
Load static web pages through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
urls
|
List[str]
|
Urls value used by the operation. |
required |
depth
|
int
|
Depth value used by the operation. |
2
|
timeout
|
int
|
Maximum time in seconds to wait for the operation. |
10
|
ignore
|
bool
|
Ignore value used by the operation. |
True
|
progress
|
bool
|
Progress value used by the operation. |
True
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
load_github ¶
Load files from a GitHub repository.
Purpose
Load files from a GitHub repository through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
repo
|
str
|
Repo value used by the operation. |
required |
branch
|
str
|
Branch value used by the operation. |
required |
filetype
|
str
|
Filetype value used by the operation. |
'.md'
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_web_page ¶
Fetch a web page for extraction.
Purpose
Fetch a web page for extraction through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url
|
str
|
URL used by the operation. |
required |
time
|
int
|
Request timeout in seconds. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scraper_html_to_text ¶
Convert scraper HTML to plain text.
Purpose
Convert scraper HTML to plain text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Html value used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_paragraphs ¶
Extract paragraph text from an HTML page.
Purpose
Extract paragraph text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_lists ¶
Extract list-item text from an HTML page.
Purpose
Extract list-item text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_tables ¶
Extract table-cell text from an HTML page.
Purpose
Extract table-cell text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_articles ¶
Extract article text from an HTML page.
Purpose
Extract article text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_headings ¶
Extract heading text from an HTML page.
Purpose
Extract heading text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_divisions ¶
Extract division text from an HTML page.
Purpose
Extract division text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_sections ¶
Extract section text from an HTML page.
Purpose
Extract section text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_blockquotes ¶
Extract blockquote text from an HTML page.
Purpose
Extract blockquote text from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_hyperlinks ¶
Extract hyperlinks from an HTML page.
Purpose
Extract hyperlinks from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
scrape_images ¶
Extract image references from an HTML page.
Purpose
Extract image references from an HTML page through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uri
|
str
|
URI used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Any |
Any
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
encode_image ¶
Encode a local image as Base64 text.
Purpose
Encode a local image as Base64 text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Local filesystem path used by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_load_text ¶
Read UTF-8 text from a local file and return the raw string.
Purpose
Read UTF-8 text from a local file and return the raw string through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_collapse_whitespace ¶
Normalize spacing by lowercasing text and collapsing repeated whitespace.
Purpose
Normalize spacing by lowercasing text and collapsing repeated whitespace through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_punctuation ¶
Strip punctuation from tokenized text.
Purpose
Strip punctuation from tokenized text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_normalize_text ¶
Convert text to lowercase for stable comparison and tokenization.
Purpose
Convert text to lowercase for stable comparison and tokenization through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_errors ¶
Filter tokens against the NLTK English words corpus.
Purpose
Filter tokens against the NLTK English words corpus through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_fragments ¶
Remove very short token fragments from normalized text.
Purpose
Remove very short token fragments from normalized text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_symbols ¶
Remove configured symbol characters from normalized text.
Purpose
Remove configured symbol characters from normalized text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_html ¶
Extract visible text from HTML markup.
Purpose
Extract visible text from HTML markup through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_xml ¶
Extract inner text from XML-like markup.
Purpose
Extract inner text from XML-like markup through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_markdown ¶
Remove common Markdown links, image syntax, and formatting markers.
Purpose
Remove common Markdown links, image syntax, and formatting markers through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_stopwords ¶
Remove English stop words from tokenized text.
Purpose
Remove English stop words from tokenized text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_encodings ¶
Resolve HTML entities, normalize Unicode characters, and remove control characters.
Purpose
Resolve HTML entities, normalize Unicode characters, and remove control characters through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_headers ¶
preprocess_remove_headers(
filepath: str,
lines: int = 50,
headers: int = 3,
footers: int = 3,
) -> str | None
Detect and remove repeated page headers and footers from a text file.
Purpose
Detect and remove repeated page headers and footers from a text file through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
lines
|
int
|
Lines value used by the operation. |
50
|
headers
|
int
|
Headers value used by the operation. |
3
|
footers
|
int
|
Footers value used by the operation. |
3
|
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_numbers ¶
Remove decimal digits from text.
Purpose
Remove decimal digits from text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_numerals ¶
Remove Roman-numeral patterns from text.
Purpose
Remove Roman-numeral patterns from text through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_remove_images ¶
Remove Markdown image references, HTML image elements, and direct image URLs.
Purpose
Remove Markdown image references, HTML image elements, and direct image URLs through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_tiktokenize ¶
Encode text with a tiktoken tokenizer and return token identifiers as tabular data.
Purpose
Encode text with a tiktoken tokenizer and return token identifiers as tabular data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
encoding
|
str
|
Text encoding or tokenizer encoding used by the operation. |
'cl100k_base'
|
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_split_sentences ¶
Split text into sentence strings using NLTK sentence tokenization.
Purpose
Split text into sentence strings using NLTK sentence tokenization through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_split_pages ¶
Split a text file into page-sized text blocks.
Purpose
Split a text file into page-sized text blocks through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
num
|
int
|
Num value used by the operation. |
50
|
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_split_paragraphs ¶
Read a text file and return paragraph-like text blocks as tabular data.
Purpose
Read a text file and return paragraph-like text blocks as tabular data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_create_frequency_distribution ¶
Build a word-frequency table from a token sequence.
Purpose
Build a word-frequency table from a token sequence through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
List[str]
|
Token values processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_create_vocabulary ¶
Extract the vocabulary column from a token-frequency table.
Purpose
Extract the vocabulary column from a token-frequency table through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
List[str]
|
Token values processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
Series | None
|
Series | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_create_wordbag ¶
Build a bag-of-words table from a token sequence.
Purpose
Build a bag-of-words table from a token sequence through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
List[str]
|
Token values processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_create_vectors ¶
Create TF-IDF vectors for token values.
Purpose
Create TF-IDF vectors for token values through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
List[str]
|
Token values processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_clean_file ¶
Apply the standard Fonky text-cleaning pipeline to a single file.
Purpose
Apply the standard Fonky text-cleaning pipeline to a single file through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_clean_files ¶
Apply the standard Fonky text-cleaning pipeline to every file in a directory.
Purpose
Apply the standard Fonky text-cleaning pipeline to every file in a directory through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source value used to scope or identify the backing operation. |
required |
destination
|
str
|
Destination used to receive generated or processed output. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
This function performs its work through the delegated implementation and does not return a value. |
Source code in gemini\tools.py
preprocess_chunk_files ¶
Split text files into sentence chunks and write chunked output files.
Purpose
Split text files into sentence chunks and write chunked output files through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source value used to scope or identify the backing operation. |
required |
destination
|
str
|
Destination used to receive generated or processed output. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
This function performs its work through the delegated implementation and does not return a value. |
Source code in gemini\tools.py
preprocess_chunk_data ¶
Chunk a text file into fixed-size word groups represented as tabular data.
Purpose
Chunk a text file into fixed-size word groups represented as tabular data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filepath
|
str
|
Local filesystem path used by the operation. |
required |
size
|
int
|
Maximum size or group size used by the operation. |
10
|
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_chunk_datasets ¶
Clean and chunk a directory of text files into spreadsheet datasets.
Purpose
Clean and chunk a directory of text files into spreadsheet datasets through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source value used to scope or identify the backing operation. |
required |
destination
|
str
|
Destination used to receive generated or processed output. |
required |
size
|
int
|
Maximum size or group size used by the operation. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
DataFrame |
DataFrame
|
Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_convert_jsonl ¶
Convert text files into line-oriented JSON-like chunk output.
Purpose
Convert text files into line-oriented JSON-like chunk output through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Source value used to scope or identify the backing operation. |
required |
destination
|
str
|
Destination used to receive generated or processed output. |
required |
size
|
int
|
Maximum size or group size used by the operation. |
10
|
Returns:
| Name | Type | Description |
|---|---|---|
None |
None
|
This function performs its work through the delegated implementation and does not return a value. |
Source code in gemini\tools.py
preprocess_encode_sentences ¶
preprocess_encode_sentences(
tokens: List[str], model: str = "all-MiniLM-L6-v2"
) -> Tuple[List[str], np.ndarray]
Generate sentence-transformer embeddings for normalized token values.
Purpose
Generate sentence-transformer embeddings for normalized token values through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokens
|
List[str]
|
Token values processed by the operation. |
required |
model
|
str
|
Model identifier used by the operation. |
'all-MiniLM-L6-v2'
|
Returns:
| Type | Description |
|---|---|
Tuple[List[str], ndarray]
|
Tuple[List[str], np.ndarray]: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_word_tokenizer ¶
Tokenize text into lowercased word tokens.
Purpose
Tokenize text into lowercased word tokens through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_sentence_tokenizer ¶
Tokenize text into lowercased sentence strings.
Purpose
Tokenize text into lowercased sentence strings through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_word_stemmer ¶
Stem lowercased word tokens with the configured Porter stemmer.
Purpose
Stem lowercased word tokens with the configured Porter stemmer through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_word_lemmatizer ¶
Lemmatize lowercased word tokens with the configured WordNet lemmatizer.
Purpose
Lemmatize lowercased word tokens with the configured WordNet lemmatizer through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[str] | None
|
List[str] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_pos_tagger ¶
Assign part-of-speech tags to lowercased word tokens.
Purpose
Assign part-of-speech tags to lowercased word tokens through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[Tuple[str, str]] | None
|
List[Tuple[str, str]] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_named_entity_recognition ¶
Extract named-entity text and entity labels from tagged tokens.
Purpose
Extract named-entity text and entity labels from tagged tokens through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
Returns:
| Type | Description |
|---|---|
List[Tuple[str, str]] | None
|
List[Tuple[str, str]] | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_chunk_words ¶
Group word tokens into fixed-size chunks and return them as tabular data.
Purpose
Group word tokens into fixed-size chunks and return them as tabular data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
size
|
int
|
Maximum size or group size used by the operation. |
5
|
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
nltk_chunk_sentences ¶
Group sentence tokens into fixed-size chunks and return them as tabular data.
Purpose
Group sentence tokens into fixed-size chunks and return them as tabular data through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text value processed by the operation. |
required |
size
|
int
|
Maximum size or group size used by the operation. |
15
|
Returns:
| Type | Description |
|---|---|
DataFrame | None
|
DataFrame | None: Value produced by the delegated Fonky implementation. |
Source code in gemini\tools.py
preprocess_semantic_search ¶
preprocess_semantic_search(
query: str,
tokens: List[str],
model: str = "all-MiniLM-L6-v2",
top: int = 5,
) -> List[Tuple[str, float]]
Search token content by semantic similarity.
Purpose
Search token content by semantic similarity through Fonky's canonical implementation so the callable can be registered directly with a Google ADK Agent through its tools collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Search query or natural-language request submitted to the backing operation. |
required |
tokens
|
List[str]
|
Token values processed by the operation. |
required |
model
|
str
|
Model identifier used by the operation. |
'all-MiniLM-L6-v2'
|
top
|
int
|
Top value used by the operation. |
5
|
Returns:
| Type | Description |
|---|---|
List[Tuple[str, float]]
|
List[Tuple[str, float]]: Value produced by the delegated Fonky implementation. |