> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# parseForeignCallDefinition

> **parseForeignCallDefinition**(`syntax`, `foreignCallNameToID`, `indexMap`, `functionArguments`): [`ForeignCallDefinition`](../../../modules/types/type-aliases/ForeignCallDefinition)

Parses the foreign call definition and validates its structure.

## Parameters

| Parameter             | Type                                                                        | Description                                             |
| --------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------- |
| `syntax`              | [`ForeignCallJSON`](../../../modules/validation/interfaces/ForeignCallJSON) | The JSON representation of the foreign call definition. |
| `foreignCallNameToID` | [`FCNameToID`](../../../modules/types/type-aliases/FCNameToID)\[]           | -                                                       |
| `indexMap`            | [`FCNameToID`](../../../modules/types/type-aliases/FCNameToID)\[]           | -                                                       |
| `functionArguments`   | `string`\[]                                                                 | -                                                       |

## Returns

[`ForeignCallDefinition`](../../../modules/types/type-aliases/ForeignCallDefinition)

Either an object containing the foreign call's name, address, function, return type, parameter types, and encoded indices if successful or an error.

## Defined in

[src/parsing/parser.ts:326](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/parsing/parser.ts#L326)
