/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { networkNetworkOptions } from "../../funcs/networkNetworkOptions.js";
import * as models from "../../models/index.js";
import { formatResult, ToolDefinition } from "../tools.js";
const args = {
request: models.NetworkRequest$inboundSchema,
};
export const tool$networkNetworkOptions: ToolDefinition<typeof args> = {
name: "network-network-options",
description: `Get Network Options
This endpoint returns the version information and allowed network-specific types for a NetworkIdentifier. Any NetworkIdentifier returned by /network/list should be accessible here. Because options are retrievable in the context of a NetworkIdentifier, it is possible to define unique options for each network.`,
args,
tool: async (client, args, ctx) => {
const [result, apiCall] = await networkNetworkOptions(
client,
args.request,
{ fetchOptions: { signal: ctx.signal } },
).$inspect();
if (!result.ok) {
return {
content: [{ type: "text", text: result.error.message }],
isError: true,
};
}
const value = result.value;
return formatResult(value, apiCall);
},
};