Skip to main content
Glama

functiongraph__UpdateFunctionConfig

Modify a specified FunctionGraph function's metadata and runtime configuration, including handler, runtime, memory, timeout, and execution environment.

Instructions

[FUNCTIONGRAPH] 修改指定的函数的metadata信息。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "func_name": "<func_name>",
      "function_urn": "<function_urn>",
      "handler": "<handler>",
      "memory_size": "<memory_size>",
      "project_id": "<project_id>",
      "runtime": "<runtime>",
      "timeout": "<timeout>"
    },
    "name": "functiongraph__UpdateFunctionConfig"
  }
}

Input Schema

NameRequiredDescriptionDefault
xroleNo函数配置委托。需要IAM支持,并在IAM界面创建委托,当函数需要访问其他服务时,必须提供该字段。配置后用户可以通过函数执行入口方法中的context参数获取具有委托中权限的token、ak、sk,用于访问其他云服务。如果用户函数不访问任何云服务,则不用提供委托名称。
handlerYes函数执行入口
runtimeYesFunctionGraph函数的执行环境
timeoutYes函数执行超时时间,超时函数将被强行停止,范围3~259200秒。
func_vpcNo函数vpc配置。需同时为函数配置具有vpc权限的委托。
gpu_typeNo显卡类型。
app_xroleNo函数执行委托。可为函数执行单独配置执行委托,这将减小不必要的性能损耗;不单独配置执行委托时,函数执行和函数配置将使用同一委托。
func_nameYes函数名称。
user_dataNo用户自定义的name/value信息。 在函数中使用的参数。 举例:如函数要访问某个主机,可以设置自定义参数:Host={host_ip},最多定义20个,总长度不超过4KB。
gpu_memoryNo函数消耗的显存,只支持自定义运行时与自定义镜像函数配置GPU。
log_configNo函数绑定日志配置。
project_idYes租户项目 ID,获取方式请参见[获取项目ID](functiongraph_06_0260.xml)。
descriptionNo函数描述。
memory_sizeYes函数消耗的内存。
custom_imageNo用户容器镜像。
domain_namesNo内网域名配置。
function_urnYes函数的URN,详细解释见FunctionGraph函数模型的描述。
mount_configNo函数挂载配置。
peering_cidrNoVPC对等连接网段。您可以声明代码中使用到的VPC网段,用以检测是否与服务使用VPC网段冲突。网段间使用分号分隔且不能超过5个。
extend_configNo函数扩展配置。
enable_lts_logNo是否开启日志。
lts_custom_tagNo自定义日志标签。函数执行时,可以按照自定义标签配置上报标签到云日志服务(LTS),用户可以通过标签对日志进行过滤筛选。
strategy_configNo函数策略配置。
pre_stop_handlerNo函数预停止函数的入口,规则:xx.xx,必须包含“. ”。
pre_stop_timeoutNo初始化超时时间,超时函数将被强行停止,范围1~90秒。
ephemeral_storageNo临时存储大小。默认情况下会为函数的/tmp目录分配512MB的空间。您可以通过临时存储设置将函数的/tmp目录大小调整为10G。
heartbeat_handlerNo心跳函数函数的入口,规则:xx.xx,必须包含“. ”,只支持JAVA运行时配置。
network_controllerNo函数网络配置。
encrypted_user_dataNo用户自定义的name/value信息,用于需要加密的配置。
initializer_handlerNo函数初始化入口,规则:xx.xx,必须包含“. ”。当配置初始化函数时,此参数必填。
initializer_timeoutNo初始化超时时间,超时函数将被强行停止,范围1~300秒。当配置初始化函数时,此参数必填。
is_stateful_functionNo是否支持有状态,如果需要支持,需要固定传参为true,v2版本支持
restore_hook_handlerNo函数快照式冷启动Restore Hook入口,仅支持Java,规则:xx.xx,必须包含“. ”。如:com.xxx.demo.Test.restoreHook
restore_hook_timeoutNo快照冷启动Restore Hook的超时时间,超时函数将被强行停止,范围1~300秒。
enable_auth_in_headerNo是否允许在请求头中添加鉴权信息
enable_dynamic_memoryNo是否启动动态内存配置
enterprise_project_idNo企业项目ID,在企业用户创建函数时必填。
enable_class_isolationNo类隔离开关,只支持JAVA运行时配置。开启类隔离后可以支持Kafka转储并提升类加载效率,但也可能会导致某些兼容性问题,请谨慎开启。
user_data_encrypt_kms_key_idNo用于环境变量加密的kms主秘钥ID。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden and delivers almost nothing. It does not say whether this is a full replacement or a partial merge (the seven required fields hint at replacement, but that is inference), what happens to fields omitted from the request, what permissions or IAM delegation are needed, or whether changes are reversible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with no wasted words, but its brevity is under-specification rather than economy. For a 39-parameter mutation tool there is nothing front-loaded beyond the bare operation, so the sentence does not earn its place as a useful definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is high-complexity: 39 parameters, 7 required, nested objects, two enums, no annotations, and no output schema. A one-line description leaves the agent without the mutation semantics, safety profile, or usage routing needed to call it correctly; only the unusually rich input schema keeps this from a 1.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 39 parameters in detail. The description adds no parameter-level meaning whatsoever — no indication of which fields are mandatory, which are mutually constrained, or which are runtime-specific. Baseline 3 applies when the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb (修改/modify) and a resource (指定的函数), but calls the target 'metadata信息', which undersells and obscures the scope — the schema shows this covers handler, runtime, memory, VPC, GPU, mount, and log configuration. It also gives no signal distinguishing it from siblings like UpdateFunctionCode or UpdateFunctionMaxInstanceConfig, so an agent must open the schema to learn what is actually being changed.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no when-not-to-use, and no reference to any alternative tool. With siblings such as UpdateFunctionCode and UpdateFunctionMaxInstanceConfig present, the agent gets no help choosing between them, and no prerequisites (permissions, IAM delegation, VPC requirements) are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools