data
DataCite Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the DataCite KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.datacite.*.
Use lua_read_doc("integrations.datacite") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
DataCite workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.datacite.list_activities({}))' --json kosmo integrations:lua --eval 'print(docs.read("datacite"))' --json
kosmo integrations:lua --eval 'print(docs.read("datacite.list_activities"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local datacite = app.integrations.datacite
local result = datacite.list_activities({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.datacite, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.datacite.default.* or app.integrations.datacite.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need DataCite, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
DataCite
Namespace: datacite
DataCite exposes public DOI metadata, clients/repositories, providers, prefixes, Event Data, usage reports, activities, heartbeat status, and a read-only GraphQL API. No API key is required for the public retrieval tools.
Mutation endpoints for creating, updating, or deleting DOIs and repositories are intentionally not exposed by this integration.
DOI Metadata
local dois = datacite.list_dois({
query = "climate data",
["client-id"] = "datacite.datacite",
["page[size]"] = 10,
sort = "-created",
detail = true,
})
local doi = datacite.get_doi({
id = "10.5438/0012",
})
datacite_list_dois supports common DataCite filters such as created, registered, published, provider-id, client-id, prefix, resource-type-id, random, sample-size, detail, include, page[number], page[size], and page[cursor].
Repository And Provider Metadata
Use these tools for account and prefix discovery:
datacite_list_clientsdatacite_get_clientdatacite_client_statsdatacite_list_client_prefixesdatacite_list_providersdatacite_get_providerdatacite_provider_statsdatacite_list_provider_prefixesdatacite_list_prefixesdatacite_get_prefixdatacite_prefix_stats
Event Data And Reports
local events = datacite.list_events({
doi = "10.5438/0012",
["relation-type-id"] = "references",
})
local status = datacite.heartbeat({})
Event Data tools expose links between DataCite DOIs and other DOIs or URLs. Report tools expose usage report metadata where available.
GraphQL
local result = datacite.graphql_query({
query = [[
query($id: ID!) {
dataset(id: $id) {
id
titles { title }
publicationYear
}
}
]],
variables = {
id = "https://doi.org/10.5438/0012",
},
})
The GraphQL API is read-only. It can query DOI resources, members, repositories, prefixes, researchers, funders, and organizations as supported by DataCite.
Return Shape
REST tools return DataCite JSON:API responses directly, typically with data, included, meta, and links. GraphQL returns the GraphQL JSON response. Arrays in query parameters are sent as comma-separated values.
Raw agent markdown
# DataCite
Namespace: `datacite`
DataCite exposes public DOI metadata, clients/repositories, providers, prefixes, Event Data, usage reports, activities, heartbeat status, and a read-only GraphQL API. No API key is required for the public retrieval tools.
Mutation endpoints for creating, updating, or deleting DOIs and repositories are intentionally not exposed by this integration.
## DOI Metadata
```lua
local dois = datacite.list_dois({
query = "climate data",
["client-id"] = "datacite.datacite",
["page[size]"] = 10,
sort = "-created",
detail = true,
})
local doi = datacite.get_doi({
id = "10.5438/0012",
})
```
`datacite_list_dois` supports common DataCite filters such as `created`, `registered`, `published`, `provider-id`, `client-id`, `prefix`, `resource-type-id`, `random`, `sample-size`, `detail`, `include`, `page[number]`, `page[size]`, and `page[cursor]`.
## Repository And Provider Metadata
Use these tools for account and prefix discovery:
- `datacite_list_clients`
- `datacite_get_client`
- `datacite_client_stats`
- `datacite_list_client_prefixes`
- `datacite_list_providers`
- `datacite_get_provider`
- `datacite_provider_stats`
- `datacite_list_provider_prefixes`
- `datacite_list_prefixes`
- `datacite_get_prefix`
- `datacite_prefix_stats`
## Event Data And Reports
```lua
local events = datacite.list_events({
doi = "10.5438/0012",
["relation-type-id"] = "references",
})
local status = datacite.heartbeat({})
```
Event Data tools expose links between DataCite DOIs and other DOIs or URLs. Report tools expose usage report metadata where available.
## GraphQL
```lua
local result = datacite.graphql_query({
query = [[
query($id: ID!) {
dataset(id: $id) {
id
titles { title }
publicationYear
}
}
]],
variables = {
id = "https://doi.org/10.5438/0012",
},
})
```
The GraphQL API is read-only. It can query DOI resources, members, repositories, prefixes, researchers, funders, and organizations as supported by DataCite.
## Return Shape
REST tools return DataCite JSON:API responses directly, typically with `data`, `included`, `meta`, and `links`. GraphQL returns the GraphQL JSON response. Arrays in query parameters are sent as comma-separated values. local result = app.integrations.datacite.list_activities({})
print(result) Functions
list_activities Read
List DataCite activity records.
- Lua path
app.integrations.datacite.list_activities- Full name
datacite.datacite_list_activities
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_activity Read
Get a DataCite activity record.
- Lua path
app.integrations.datacite.get_activity- Full name
datacite.datacite_get_activity
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_client_prefixes Read
List client-prefix records.
- Lua path
app.integrations.datacite.list_client_prefixes- Full name
datacite.datacite_list_client_prefixes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_clients Read
List DataCite clients/repositories.
- Lua path
app.integrations.datacite.list_clients- Full name
datacite.datacite_list_clients
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
client_stats Read
Get clients DOI production statistics.
- Lua path
app.integrations.datacite.client_stats- Full name
datacite.datacite_client_stats
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_client Read
Get one DataCite client/repository.
- Lua path
app.integrations.datacite.get_client- Full name
datacite.datacite_get_client
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_dois Read
List, search, filter, sort, sample, or page DOI metadata.
- Lua path
app.integrations.datacite.list_dois- Full name
datacite.datacite_list_dois
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_doi Read
Get one DOI metadata record.
- Lua path
app.integrations.datacite.get_doi- Full name
datacite.datacite_get_doi
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
doi_activities Read
Get activities for a DOI.
- Lua path
app.integrations.datacite.doi_activities- Full name
datacite.datacite_get_doi_activities
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_events Read
List DataCite Event Data records.
- Lua path
app.integrations.datacite.list_events- Full name
datacite.datacite_list_events
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_event Read
Get one Event Data record.
- Lua path
app.integrations.datacite.get_event- Full name
datacite.datacite_get_event
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
heartbeat Read
Check REST API status.
- Lua path
app.integrations.datacite.heartbeat- Full name
datacite.datacite_heartbeat
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_prefixes Read
List DOI prefixes.
- Lua path
app.integrations.datacite.list_prefixes- Full name
datacite.datacite_list_prefixes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
prefix_stats Read
Get prefixes DOI production statistics.
- Lua path
app.integrations.datacite.prefix_stats- Full name
datacite.datacite_prefix_stats
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_prefix Read
Get one DOI prefix.
- Lua path
app.integrations.datacite.get_prefix- Full name
datacite.datacite_get_prefix
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_provider_prefixes Read
List provider-prefix records.
- Lua path
app.integrations.datacite.list_provider_prefixes- Full name
datacite.datacite_list_provider_prefixes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_providers Read
List DataCite providers.
- Lua path
app.integrations.datacite.list_providers- Full name
datacite.datacite_list_providers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
provider_stats Read
Get providers DOI production statistics.
- Lua path
app.integrations.datacite.provider_stats- Full name
datacite.datacite_provider_stats
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_provider Read
Get one DataCite provider.
- Lua path
app.integrations.datacite.get_provider- Full name
datacite.datacite_get_provider
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_reports Read
List usage reports.
- Lua path
app.integrations.datacite.list_reports- Full name
datacite.datacite_list_reports
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_report Read
Get one usage report.
- Lua path
app.integrations.datacite.get_report- Full name
datacite.datacite_get_report
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
graphql_query Read
Execute a read-only DataCite GraphQL query.
- Lua path
app.integrations.datacite.graphql_query- Full name
datacite.datacite_graphql_query
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | GraphQL query string. |
variables | object | no | GraphQL variables. |