data
Crossref Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Crossref KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.crossref.*.
Use lua_read_doc("integrations.crossref") 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
Crossref workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.crossref.list_works({}))' --json kosmo integrations:lua --eval 'print(docs.read("crossref"))' --json
kosmo integrations:lua --eval 'print(docs.read("crossref.list_works"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local crossref = app.integrations.crossref
local result = crossref.list_works({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.crossref, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.crossref.default.* or app.integrations.crossref.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Crossref, 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.
Crossref
Namespace: crossref
Crossref provides public scholarly metadata through its REST API. No API key is required. Pass mailto on list requests to identify your client and use Crossref’s polite pool.
Works
local works = crossref.list_works({
query = "large language models",
rows = 10,
filter = {
type = "journal-article",
["from-pub-date"] = "2024-01-01",
},
mailto = "[email protected]",
})
local work = crossref.get_work({
doi = "10.1128/mbio.01735-25",
})
Use crossref_get_work_agency to identify whether a DOI is registered with Crossref, DataCite, or another agency.
Scoped Works
Crossref supports work lists scoped by journal, member, prefix, funder, and work type:
crossref_list_journal_workscrossref_list_member_workscrossref_list_prefix_workscrossref_list_funder_workscrossref_list_type_works
These tools accept the same common list parameters as crossref_list_works, including rows, offset, cursor, filter, select, sort, order, facet, sample, and mailto.
Reference Data
Use the list/get tools for Crossref reference entities:
- journals
- members
- prefixes
- funders
- types
- licenses
local journal = crossref.get_journal({ issn = "0306-4530" })
local member = crossref.get_member({ id = "98" })
local prefix = crossref.get_prefix({ prefix = "10.5555" })
local article_type = crossref.get_type({ id = "journal-article" })
Return Shape
The integration returns Crossref JSON directly. Successful responses usually contain:
statusmessage-typemessage-versionmessage
Filters can be sent as a raw Crossref filter string or as a Lua table; tables are converted to filter:value comma syntax.
Raw agent markdown
# Crossref
Namespace: `crossref`
Crossref provides public scholarly metadata through its REST API. No API key is required. Pass `mailto` on list requests to identify your client and use Crossref's polite pool.
## Works
```lua
local works = crossref.list_works({
query = "large language models",
rows = 10,
filter = {
type = "journal-article",
["from-pub-date"] = "2024-01-01",
},
mailto = "[email protected]",
})
local work = crossref.get_work({
doi = "10.1128/mbio.01735-25",
})
```
Use `crossref_get_work_agency` to identify whether a DOI is registered with Crossref, DataCite, or another agency.
## Scoped Works
Crossref supports work lists scoped by journal, member, prefix, funder, and work type:
- `crossref_list_journal_works`
- `crossref_list_member_works`
- `crossref_list_prefix_works`
- `crossref_list_funder_works`
- `crossref_list_type_works`
These tools accept the same common list parameters as `crossref_list_works`, including `rows`, `offset`, `cursor`, `filter`, `select`, `sort`, `order`, `facet`, `sample`, and `mailto`.
## Reference Data
Use the list/get tools for Crossref reference entities:
- journals
- members
- prefixes
- funders
- types
- licenses
```lua
local journal = crossref.get_journal({ issn = "0306-4530" })
local member = crossref.get_member({ id = "98" })
local prefix = crossref.get_prefix({ prefix = "10.5555" })
local article_type = crossref.get_type({ id = "journal-article" })
```
## Return Shape
The integration returns Crossref JSON directly. Successful responses usually contain:
- `status`
- `message-type`
- `message-version`
- `message`
Filters can be sent as a raw Crossref filter string or as a Lua table; tables are converted to `filter:value` comma syntax. local result = app.integrations.crossref.list_works({})
print(result) Functions
list_works Read
List, search, filter, facet, sample, or page Crossref works.
- Lua path
app.integrations.crossref.list_works- Full name
crossref.crossref_list_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_work Read
Get one Crossref work by DOI.
- Lua path
app.integrations.crossref.get_work- Full name
crossref.crossref_get_work
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_work_agency Read
Get DOI registration agency.
- Lua path
app.integrations.crossref.get_work_agency- Full name
crossref.crossref_get_work_agency
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_journals Read
List Crossref journals.
- Lua path
app.integrations.crossref.list_journals- Full name
crossref.crossref_list_journals
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_journal Read
Get journal details by ISSN.
- Lua path
app.integrations.crossref.get_journal- Full name
crossref.crossref_get_journal
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
journal_works Read
List works in a journal.
- Lua path
app.integrations.crossref.journal_works- Full name
crossref.crossref_list_journal_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_members Read
List Crossref members.
- Lua path
app.integrations.crossref.list_members- Full name
crossref.crossref_list_members
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_member Read
Get member details.
- Lua path
app.integrations.crossref.get_member- Full name
crossref.crossref_get_member
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
member_works Read
List works for a member.
- Lua path
app.integrations.crossref.member_works- Full name
crossref.crossref_list_member_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_prefix Read
Get prefix steward.
- Lua path
app.integrations.crossref.get_prefix- Full name
crossref.crossref_get_prefix
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
prefix_works Read
List works for a prefix.
- Lua path
app.integrations.crossref.prefix_works- Full name
crossref.crossref_list_prefix_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_funders Read
List funders.
- Lua path
app.integrations.crossref.list_funders- Full name
crossref.crossref_list_funders
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_funder Read
Get funder details.
- Lua path
app.integrations.crossref.get_funder- Full name
crossref.crossref_get_funder
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
funder_works Read
List works for a funder.
- Lua path
app.integrations.crossref.funder_works- Full name
crossref.crossref_list_funder_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_types Read
List work types.
- Lua path
app.integrations.crossref.list_types- Full name
crossref.crossref_list_types
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_type Read
Get work type details.
- Lua path
app.integrations.crossref.get_type- Full name
crossref.crossref_get_type
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
type_works Read
List works for a type.
- Lua path
app.integrations.crossref.type_works- Full name
crossref.crossref_list_type_works
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_licenses Read
List licenses.
- Lua path
app.integrations.crossref.list_licenses- Full name
crossref.crossref_list_licenses
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||