KosmoKrator

other

Freshservice CLI for AI Agents

Use the Freshservice CLI from KosmoKrator to call Freshservice tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

10 functions 7 read 3 write API key auth

Freshservice CLI Setup

Freshservice can be configured headlessly with `kosmokrator integrations:configure freshservice`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure freshservice --set api_key="$FRESHSERVICE_API_KEY" --set domain="$FRESHSERVICE_DOMAIN" --enable --read allow --write ask --json
kosmokrator integrations:doctor freshservice --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key FRESHSERVICE_API_KEY Secret secret yes API Key
domain FRESHSERVICE_DOMAIN Text string yes Domain

Call Freshservice Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call freshservice.freshservice_list_tickets '{
  "page": 1,
  "per_page": 1,
  "filter": "example_filter"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:freshservice freshservice_list_tickets '{
  "page": 1,
  "per_page": 1,
  "filter": "example_filter"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs freshservice --json
kosmo integrations:docs freshservice.freshservice_list_tickets --json
kosmo integrations:schema freshservice.freshservice_list_tickets --json
kosmo integrations:search "Freshservice" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Freshservice.

freshservice.freshservice_list_tickets

Read read

List support tickets from Freshservice. Supports pagination and predefined filters (e.g., new_and_my_open, watching, spam, deleted). Returns ticket summaries including subject, status, priority, and requester.

Parameters
page, per_page, filter

Generic CLI call

kosmo integrations:call freshservice.freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json

freshservice.freshservice_get_ticket

Read read

Get full details of a specific Freshservice ticket by its ID, including description, status, priority, requester, assigned agent, and custom fields.

Parameters
ticket_id

Generic CLI call

kosmo integrations:call freshservice.freshservice_get_ticket '{"ticket_id":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_get_ticket '{"ticket_id":1}' --json

freshservice.freshservice_create_ticket

Write write

Create a new support ticket in Freshservice. Requires a subject and description. Optionally specify the requester email and priority (1=Low, 2=Medium, 3=High, 4=Urgent).

Parameters
subject, description, email, priority

Generic CLI call

kosmo integrations:call freshservice.freshservice_create_ticket '{"subject":"example_subject","description":"example_description","email":"example_email","priority":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_create_ticket '{"subject":"example_subject","description":"example_description","email":"example_email","priority":1}' --json

freshservice.freshservice_update_ticket

Write write

Update an existing Freshservice ticket. You can change status, priority, assigned agent, add tags, or modify any writable field.

Parameters
ticket_id, subject, description, priority, status, responder_id, tags

Generic CLI call

kosmo integrations:call freshservice.freshservice_update_ticket '{"ticket_id":1,"subject":"example_subject","description":"example_description","priority":1,"status":1,"responder_id":1,"tags":"example_tags"}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_update_ticket '{"ticket_id":1,"subject":"example_subject","description":"example_description","priority":1,"status":1,"responder_id":1,"tags":"example_tags"}' --json

freshservice.freshservice_delete_ticket

Write write

Delete a support ticket from Freshservice. This action permanently removes the ticket and its conversations.

Parameters
ticket_id

Generic CLI call

kosmo integrations:call freshservice.freshservice_delete_ticket '{"ticket_id":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_delete_ticket '{"ticket_id":1}' --json

freshservice.freshservice_list_agents

Read read

List all agents (support staff) in the Freshservice account. Returns agent profiles including name, email, and availability.

Parameters
page

Generic CLI call

kosmo integrations:call freshservice.freshservice_list_agents '{"page":"example_page"}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_list_agents '{"page":"example_page"}' --json

freshservice.freshservice_get_agent

Read read

Get details of a specific Freshservice agent by their ID, including name, email, role, and availability status.

Parameters
agent_id

Generic CLI call

kosmo integrations:call freshservice.freshservice_get_agent '{"agent_id":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_get_agent '{"agent_id":1}' --json

freshservice.freshservice_list_assets

Read read

List IT assets from Freshservice. Supports pagination. Returns asset summaries including name, asset type, and state.

Parameters
page

Generic CLI call

kosmo integrations:call freshservice.freshservice_list_assets '{"page":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_list_assets '{"page":1}' --json

freshservice.freshservice_get_asset

Read read

Get full details of a specific Freshservice asset by its display ID, including name, type, state, location, and custom fields.

Parameters
asset_id

Generic CLI call

kosmo integrations:call freshservice.freshservice_get_asset '{"asset_id":1}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_get_asset '{"asset_id":1}' --json

freshservice.freshservice_get_current_user

Read read

Get the profile of the currently authenticated Freshservice agent. Useful for identifying which agent is performing actions.

Parameters
none

Generic CLI call

kosmo integrations:call freshservice.freshservice_get_current_user '{}' --json

Provider shortcut

kosmo integrations:freshservice freshservice_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

freshservice.freshservice_list_tickets

List support tickets from Freshservice. Supports pagination and predefined filters (e.g., new_and_my_open, watching, spam, deleted). Returns ticket summaries including subject, status, priority, and requester.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_list_tickets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
per_page integer no Number of tickets per page (max 100).
filter string no Predefined filter: "new_and_my_open", "watching", "spam", or "deleted".

freshservice.freshservice_get_ticket

Get full details of a specific Freshservice ticket by its ID, including description, status, priority, requester, assigned agent, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_get_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID.

freshservice.freshservice_create_ticket

Create a new support ticket in Freshservice. Requires a subject and description. Optionally specify the requester email and priority (1=Low, 2=Medium, 3=High, 4=Urgent).

Operation
Write write
Schema command
kosmo integrations:schema freshservice.freshservice_create_ticket --json
ParameterTypeRequiredDescription
subject string yes The ticket subject / title.
description string yes The ticket description (supports HTML).
email string no Email address of the requester.
priority integer no Priority level: 1=Low, 2=Medium, 3=High, 4=Urgent.

freshservice.freshservice_update_ticket

Update an existing Freshservice ticket. You can change status, priority, assigned agent, add tags, or modify any writable field.

Operation
Write write
Schema command
kosmo integrations:schema freshservice.freshservice_update_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID.
subject string no Updated ticket subject.
description string no Updated ticket description (supports HTML).
priority integer no Priority level: 1=Low, 2=Medium, 3=High, 4=Urgent.
status integer no Status: 2=Open, 3=Pending, 4=Resolved, 5=Closed.
responder_id integer no ID of the agent to assign the ticket to.
tags array no Array of tag strings to set on the ticket.

freshservice.freshservice_delete_ticket

Delete a support ticket from Freshservice. This action permanently removes the ticket and its conversations.

Operation
Write write
Schema command
kosmo integrations:schema freshservice.freshservice_delete_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID to delete.

freshservice.freshservice_list_agents

List all agents (support staff) in the Freshservice account. Returns agent profiles including name, email, and availability.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_list_agents --json
ParameterTypeRequiredDescription
page string no Page cursor for pagination — pass the value from a previous response to get the next page.

freshservice.freshservice_get_agent

Get details of a specific Freshservice agent by their ID, including name, email, role, and availability status.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_get_agent --json
ParameterTypeRequiredDescription
agent_id integer yes The agent ID.

freshservice.freshservice_list_assets

List IT assets from Freshservice. Supports pagination. Returns asset summaries including name, asset type, and state.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_list_assets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).

freshservice.freshservice_get_asset

Get full details of a specific Freshservice asset by its display ID, including name, type, state, location, and custom fields.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_get_asset --json
ParameterTypeRequiredDescription
asset_id integer yes The asset display ID.

freshservice.freshservice_get_current_user

Get the profile of the currently authenticated Freshservice agent. Useful for identifying which agent is performing actions.

Operation
Read read
Schema command
kosmo integrations:schema freshservice.freshservice_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.