---
title: "Execute Library Function"
method: POST
path: "/formulamanager.executelibraryfunction/{formulaName}/{elementName}/{functionName}"
tags: ["Logics"]
---

# Execute Library Function

`POST /formulamanager.executelibraryfunction/{formulaName}/{elementName}/{functionName}`

Executes a specific function from a **formula library element** without requiring a full formula logic implementation.<br>
Parameters are provided via the request payload and the calculated result is returned.<p>
>**Note**:
>- This endpoint **does not** work with `inputs` bindings. Provide ordered function arguments instead.
>- Used by the **Pricefx MCP server** to enable Groovy-configured MCP Tools.
>- Requires the `PRICINGFORMULA_EXECUTE` permission.

## Request body

- object
  - `data` object
    - `allowObjectMods` boolean — Specifies whether the logic may internally perform modifications. Defaults to **false**.
    - `functionArgs` unknown[] — An array of input arguments, that will be passed in order to the function call. Note, do not provide the parameter names, only the ordered literal values you want passed in.
      - unknown

## Response `200`

OK

## Other responses

- `400` — Bad request. Validation or execution error. Possible causes: - Missing or invalid path segments - Library formula not found - Formula exists but not of type LIBRARY - Library element not found within the logic - `allowObjectMods` has wrong type (must be a boolean) - `functionArgs` must be an array/list - An exception occurred during function execution
- `401` — Unauthorized. Authentication required or failed.
- `403` — Forbidden. Insufficient permissions. Requires PRICINGFORMULA_EXECUTE
- `500` — Internal Server Error

---

[API](https://skmtc.net/pricefx/apis/the-pricefx-backend-api.md) · [All operations](https://skmtc.net/pricefx/apis/the-pricefx-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pricefx/the-pricefx-backend-api/versions/0850b5d6be73/schema)
