List secrets

The NAMES of the secrets the caller org's functions mount.

GET /v1/function/secrets

Addresshttps://api.hanzo.ai/v1/function/secrets
MethodGET
Operationget_function_secrets
AuthAuthorization: Bearer $HANZO_API_KEY

The NAMES of the secrets the caller org's functions mount.

Values are NEVER read or returned — this surface knows which names a function asks for and nothing about what is behind them, which is what makes it safe to list at all. One row per distinct (namespace, name).

Request

GET /v1/function/secrets takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200function.secretListok
defaultproblem-detailsrefused

200 body — 4 fields.

FieldInTypeAlwaysDescription
secretsbodyfunction.secretView[]—Secrets is one row per distinct (namespace, name) a function mounts.
secrets[].mountedBybodystring—MountedBy is a function that mounts it.
secrets[].namebodystring—Name is the environment variable the function mounts.
secrets[].namespacebodystring—Namespace is the group the mounting function belongs to.

Failure carries the platform error shape — see Errors.

Examples

hanzo function secrets
import { Configuration, FunctionApi } from 'hanzoai';

const api = new FunctionApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getFunctionSecrets();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import FunctionApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = FunctionApi(client).get_function_secrets()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.FunctionAPI.GetFunctionSecrets(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, function_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = function_api::get_function_secrets(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.FunctionApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new FunctionApi(client).getFunctionSecrets();
curl https://api.hanzo.ai/v1/function/secrets \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches function through the function tool, which names its 10 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_functions"
         }
       }
     }'

Function API · All Hanzo APIs · Interactive reference

Was this page useful?