# Type Alias SingleAfterToolCallback

SingleAfterToolCallback: (
params: {
args: Record<string, unknown>;
context: Context;
response: Record<string, unknown>;
tool: BaseTool;
},
) => | Record<string, unknown>
| undefined
| Promise<Record<string, unknown> | undefined>

A callback that runs after a tool is called.

#### Type Declaration

- - (
    params: {
    args: Record<string, unknown>;
    context: Context;
    response: Record<string, unknown>;
    tool: BaseTool;
    },
    ): | Record<string, unknown>
    | undefined
    | Promise<Record<string, unknown> | undefined>

  - #### Parameters

    - params: {
      args: Record<string, unknown>;
      context: Context;
      response: Record<string, unknown>;
      tool: BaseTool;
      }

      - ##### args: Record<string, unknown>

        The arguments to the tool.

      - ##### context: Context

        Context for the tool call.

      - ##### response: Record<string, unknown>

        The response from the tool.

      - ##### tool: BaseTool

        The tool to be called.

    #### Returns
    | Record<string, unknown>
    | undefined
    | Promise<Record<string, unknown> | undefined>

    When present, the returned record will be used as tool result.

- Defined in agents/llm_agent.ts:164