> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockx.chaintable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoke and debug

> Inspect one EVM function call without submitting a task.

Use Sync Invoker to execute one user function and receive its result in the same RPC. Use the same explicit chain and block arguments as in [Write EVM data functions](/guides/write-functions).

## Prerequisites

Connect a gRPC client to an available Sync Invoker using your environment's connection and authentication setup. The service definition is `api/grpc/syncinvoker/sync_invoker.proto` in the BlockX repository. EVM functions also require the relevant node backend.

## Check and invoke

1. Submit the function source to `Precheck` when static auditing is available. Read the returned findings; this operation does not execute the function.
2. Select exactly one function source: `function_id` for a registered function, or `inline_source.source_code` for inline Python.
3. Encode positional arguments as a JSON array in `args_json`. For the balance example, supply the chain, concrete block identifier, token, and holder.
4. Call `Invoke` for the value, or `DebugInvoke` when you also need captured output.
5. Check `success`. On success, decode `result_json`; on failure, inspect `failure`.

## Confirm the result

Record `call_id` with the chain and block you queried. `DebugInvoke` can return a bounded stdout/stderr tail and failure diagnostics in `debug_output`. It does not run a task Writer Plugin.

## Handle failures

| Result | Next step |
| - | - |
| Precheck findings | Correct the function before invoking |
| RPC error | Check the request, connection, and service readiness |
| `success=false` | Inspect `failure.code`, `failure.message`, and `failure.retryable` |
| Unexpected value | Recheck the block context, contract, and method arguments |

## Continue reading

* [Service API reference](/reference/service-api)
* [Sync Invoker](/components/sync-invoker)
* [Function code](/concepts/function-code)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.