UltipaDocs
Products
Solutions
Resources
Company
Start Free Trial
UltipaDocs
Start Free Trial
  • Introduction
  • GQL vs Other Languages
    • Overview
    • Node and Edge Patterns
    • Path Patterns
    • Quantified Paths
    • Questioned Paths
    • Shortest Paths
    • Cheapest Paths
    • K-Hop Traversal
    • Graph Patterns
    • Overview
    • Open Graphs
    • Closed Graphs
    • Graph Types
    • Constraints
    • Projections
    • Storage Maintenance
    • Node and Edge IDs
    • INSERT
    • INSERT OVERWRITE
    • UPSERT
    • MERGE
    • SET
    • REMOVE
    • DELETE
    • FOREACH
    • Query Composition
    • Result Table and Visualization
    • MATCH
    • OPTIONAL MATCH
    • FILTER
    • LET
    • FOR
    • ORDER BY
    • LIMIT
    • SKIP
    • CALL
    • RETURN
    • Composite Query
    • NEXT
    • All Functions
    • Element Functions
    • Path Functions
    • Aggregate Functions
    • Mathematical Functions
    • Trigonometric Functions
    • String Functions
    • List Functions
    • Datetime Functions
    • Spatial Functions
    • Null Functions
    • Utility Functions
    • Type Conversion Functions
    • Table Functions
    • Database Functions
  • Operators
  • Predicates
    • CASE
    • LET Value Expression
    • Value Query Expression
    • List Expressions
    • Index
    • Full-text Index
    • Vector Index
  • Transactions
  • Triggers
  • Query Management
  • Execution Plan
  • Backup and Restore
    • Variables
    • Values and Types
    • Comments
    • Reserved Words
    • Naming Conventions
    • Syntactic Notation
  • GQL Conformance
  1. Docs
  2. /
  3. ISO GQL
  4. /
  5. Functions

All Functions

This section contains a summary of all functions supported in GQL.

Showing Functions

To list the functions registered in your running engine, run:

GQL
SHOW FUNCTIONS

Use the LIKE clause to filter by name pattern:

GQL
SHOW FUNCTIONS LIKE 'date%'

Use the FORMAT clause to render each function's signature in a tool-calling schema, designed to be passed to an LLM as a list of callable tools. The output is a single row containing one JSON blob. All three formats are JSON Schema-based; only the wrapper shape differs.

FormatOutput shape
MCPMCP tool-list JSON: array of {name, description, inputSchema}, ready to plug into a Model Context Protocol server
JSON_SCHEMAAlias for MCP
OPENAIOpenAI function-calling JSON: array of {type: "function", function: {name, description, parameters}}, the shape OpenAI's chat-completions API expects under tools
GQL
SHOW FUNCTIONS FORMAT MCP
SHOW FUNCTIONS FORMAT JSON_SCHEMA
SHOW FUNCTIONS FORMAT OPENAI

Element Functions

FunctionDescription
id()Gets the unique identifier _id of a graph element.
labels()Gets the labels of a graph element.
type()Gets the label of an edge.
keys()Returns the property names of a node, edge, or the key names of a record.
values()Returns the property values of a node, edge, or the values of a record.
properties()Returns the properties of a node or edge as a record.
property_exists()Checks whether a property exists on a node or edge.

Path Functions

FunctionDescription
path_length()Returns the number of edges in a path.
elements()Returns the nodes and edges of a path as a list.
pnodes()Returns the nodes of a path as a list.
pedges()Returns the edges of a path as a list.
node_ids()Collects the _id values of nodes in a path into a list.
edge_ids()Collects the _id values of edges in a path into a list.
ids()Generic _id accessor for a path, node/edge, or list of nodes/edges.

Aggregate Functions

FunctionDescription
collect()Collects a set of values into a list.
collect_distinct()Collects a set of values into a list, removing duplicates.
count()Returns the number of rows in the input.
max()Returns the maximum value in a set of values.
min()Returns the minimum value in a set of values.
avg()Computes the average of a set of numeric values.
sum()Computes the sum of a set of numeric values.
percentile_cont()Computes the continuous percentile value over a set of numeric values.
percentile_disc()Computes the discrete percentile value over a set of numeric values.
stddev_samp()Computes the sample standard deviation of a set of numeric values。
stddev_pop()Computes the population standard deviation of a set of numeric values.
var_samp()Computes the sample variance of a set of numeric values.
var_pop()Computes the population variance of a set of numeric values.

Mathematical Functions

FunctionDescription
abs()Returns the absolute value of a given number.
ceil()Rounds a given number up to the nearest integer.
floor()Rounds a given number down to the nearest integer.
round()Returns the nearest value of a given number, rounded to a specified position of digits.
mod()Computes the modulus, or the remainder when one number is divided by another.
sqrt()Computes the square root of a given number.
exp()Computes the value of Euler's number 𝑒 raised to the power of a given number.
power()Raises a number to the power of another number.
ln()Computes the natural logarithm of a given number.
log()Computes the logarithm of a specified number with respect to a given base.
log10()Computes the base 10 logarithm of a given number.
pi()Returns the mathematical constant π (pi).
e()Returns the mathematical constant e (Euler's number).
random()Returns a random floating-point number between 0 and 1.
sign()Returns the sign of a number: -1, 0, or 1.

Trigonometric Functions

Function
Description
acos()Computes the angle in radians whose cosine is a given number.
asin()Computes the angle in radians whose sine is a given number.
atan()Computes the angle in radians whose tangent is a given number.
atan2()Computes the angle in radians from the positive x-axis to the point (x, y).
cos()Computes the cosine of an angle expressed in radian.
cosh()Computes the hyperbolic cosine of an angle expressed in radian.
cot()Computes the cotangent of an angle expressed in radian.
degrees()Converts an angle from radians to degrees.
radians()Converts an angle from degrees to radians.
sin()Computes the sine of an angle expressed in radian.
sinh()Computes the hyperbolic sine of an angle expressed in radian.
tan()Computes the tangent of an angle expressed in radian.
tanh()Computes the angle in radians whose cosine is a given number.

String Functions

FunctionDescription
char_length()Returns the number of characters in a string.
byte_length()Returns the number of bytes in a string.
lower()Converts all characters to lowercase.
upper()Converts all characters to uppercase.
left()Returns the specified number of leftmost characters.
right()Returns the specified number of rightmost characters.
substring()Returns a substring from the given string.
trim()Removes characters from either end of a string.
trim_sc_both()Removes a specified single character from both ends of a string.
trim_sc_leading()Removes a specified single character from the leading end of a string.
trim_sc_trailing()Removes a specified single character from the trailing end of a string.
ltrim()Removes characters from the beginning of a string.
rtrim()Removes characters from the end of a string.
btrim()Removes characters from both ends of a string.
reverse()Reverses a string.
replace()Replaces all occurrences of a substring with another string.
split()Splits a string by a delimiter into a list.
contains()Returns true if a string contains the specified substring.
starts_with()Returns true if a string starts with the specified prefix.
ends_with()Returns true if a string ends with the specified suffix.
normalize()Converts a string to a Unicode normalization form.
hex()Encodes a string to hexadecimal.
unhex()Decodes a hexadecimal string to bytes.
base64()Encodes a string to a Base64 string.
unbase64()Decodes a Base64 string to bytes.

List Functions

FunctionDescription
head()Returns the first element in a list.
last()Returns the last element of a list.
tail()Returns all elements except the first.
reverse()Returns a list with elements in reversed order.
size()Returns the number of elements in a list.
append()Adds an element to the end of a list.
range()Generates a list of integers.
list_contains()Returns true if a value exists in a specified list.
list_union()Returns the union of two lists.
intersection()Returns the intersection of two lists.
difference()Returns the difference between two lists.
list_sort()Sorts a list.
list_filter()Filters a list by a condition.
reduce()Performs a calculation iteratively using each element in a list.

Datetime Functions

Function
Description
date()Creates a value of type DATE (LOCAL DATE).
local_time()Creates a value of type LOCAL TIME.
local_datetime()Creates a value of type LOCAL DATETIME.
zoned_time()Creates a value of type ZONED TIME.
zoned_datetime()Creates a value of type ZONED DATETIME.
now()Returns the current zoned datetime in the server's local timezone.
duration()Creates a value of type DURATION.
date_add()Adds a time interval to a date.
date_diff()Computes the difference between two dates.
day_of_week()Returns the day of the week for a given date.
year()Extracts the year.
month()Extracts the month.
day()Extracts the day.
hour()Extracts the hour.
minute()Extracts the minute.
second()Extracts the second.
duration_between()Computes the duration between two temporal values.
dateformat()Formats a temporal value as a string.

Spatial Functions

Function
Description
point()Creates a two-dimensional geographical coordinate.
point3d()Creates a three-dimensional Cartesian coordinate.
distance()Computes the distance between two points.
pointget()Extracts a coordinate value from a point by index.

Null Functions

FunctionDescription
coalesce()Returns the first non-null value from the argument list.
nullif()Returns null if two arguments are equal; otherwise returns the first.

Utility Functions

FunctionDescription
cardinality()Returns the size of a path, list, or record.
typeof()Returns the type name of a value as a string.
all_different()Returns true if all arguments are different graph elements.

Type Conversion Functions

FunctionDescription
cast()Converts a value to the specified type.
toInteger()Converts a value to an integer.
toFloat()Converts a value to a float.
toString()Converts a value to a string.
toBoolean()Converts a value to a boolean.
toList()Converts a value to a list.
toMap()Creates a record from key-value pairs.

Table Functions

Function
Description
table()Constructs a table.

Database Functions

Function
Description
db.version()Returns the database version.
db.license()Returns license information.
db.plugins()Returns loaded plugins.
db.stats()Returns statistics of the current graph.
db.overview()Returns the current graph overview with label counts and edge patterns.
db.nodeLabels()Returns all node labels in the current graph.
db.edgeLabels()Returns all edge labels in the current graph.
db.labelProperty()Returns properties defined for each label in the current graph.
db.reloadStats()Rebuilds statistics from storage for the current graph.
db.backup()Creates a backup of the current graph.
db.restore()Restores a graph from a backup file.
db.backups()Lists backup files found in a directory.

AI & Vector Functions

AI and vector functions (vector creation, embeddings, similarity, vector index ops, NL→GQL pipeline) are documented in AI & Vectors.