Repository navigation
Three Checks Before You Let an Agent Call a Tool
A practical 1flowbase MCP walkthrough
An agent finds a tool called “create page.” Should it call it? A name and a short description leave several questions open: what arguments are valid, which application receives them, what authority the caller has, and how a large response will be delivered. Those questions deserve separate checks before execution.
Here is a small, reproducible example from 1flowbase: discover a metadata reader, inspect its current contract, then request three version fields. The test uses public contract metadata on an authorized demonstration instance. It reads no customer records and changes no application state. The same sequence provides a useful review habit for more consequential tools.
Begin with the directory. 1flowbase exposes mcp_list for navigation and mcp_get for detailed contracts. Its Virtual UI guidance organizes capabilities around user tasks and domain language, with short discovery descriptions and children_count helping an agent decide where to look next. [1]
This was the first request in the test:
mcp_list
{
"path": "/frontstage",
"depth": 1,
"limit": 10
}The response contained ten directory entries, including frontstage_get_block_context_contract, a low-risk metadata reader. It also contained the selected group and child-group summaries. Treat this result as a bounded navigation view: this observation does not establish that depth: 1 always means only immediate tool children, or that ten entries represent the complete catalog.
Before proceeding, connect the capability to the requested task. Reading the Block context contract helps identify what a frontend block can use. Creating a page would change application state and requires a separate decision. A nearby directory entry alone does not justify calling it.
Next, inspect the selected tool:
mcp_get
{
"tool_id": "frontstage_get_block_context_contract"
}The observed input_schema accepted an empty object and disallowed additional properties. Its result_schema named schema_version, contract_version, block_sdk_version, entries, and non_context_symbols. The response exposed des_id, max_inline_chars, and response_fields as call controls. It reported des_id_required as false. The test still supplied the current returned des_id when calling.
Make these checks per tool and deployment. An outer gateway parameter being optional does not establish what every underlying tool requires. Read the current description, input schema, result schema, and exposed controls together. If the contract is unclear about effects, resolve that uncertainty before execution.
Discovery also leaves authorization unresolved. 1flowbase’s published design assigns permissions, resource ownership, and valid state transitions to the backend execution entry point. [1] A visible capability therefore still needs caller authorization and valid target resources. A risk label can inform review, but cannot replace those checks or the user’s permission for a consequential action.
For a version check, the larger contract body was unnecessary. The call selected three mapped fields and requested a finite response budget:
mcp_call
{
"tool_id": "frontstage_get_block_context_contract",
"des_id": "<current value from mcp_get>",
"arguments": {},
"response_fields": [
"/schema_version",
"/contract_version",
"/block_sdk_version"
],
"max_inline_chars": 2000
}These are meta-tool payloads, not a transport client. Replace the des_id placeholder with the value from your own preceding inspection, and use an authorized instance where this tool is present.
The call succeeded. Its returned entries included:
/schema_version 1flowbase.block-context-contract/v1
/contract_version 1.0.0
/block_sdk_version 1.0.0
The documented controls select JSON Pointer paths after output mapping. max_inline_chars budgets serialized result content; it is not a token count. An empty response_fields array selects no business fields. These controls do not grant access to additional data. [2]
There is an important implementation boundary. The current proxy code calls the upstream tool, maps its result, and then delivers the selected output. [3] From that ordering, it follows that downstream projection cannot itself fix an upstream response-size rejection. If the upstream call fails before a result arrives, selecting fewer downstream fields comes too late.
When diagnosing such a failure, locate the failing layer first. If the upstream API supports pagination, server-side filters, or a smaller query, inspect its contract and use those mechanisms there. Verify which component enforces the limit before changing budgets. This example did not reproduce an upstream limit failure.
The observed response also supplied a cached result reference and retry_original: false. For additional detail, the documented mcp_result route can read the cached result without repeating the business operation. [2] That distinction matters especially after a write: missing detail is insufficient justification for executing the write again.
- Confirm the environment, account, and exact tool match the task.
- Inspect the current contract and required arguments before composing a call.
- Check permissions, target ownership, and expected side effects independently of discovery.
- Use only exposed return controls and select the fields needed for the decision.
- Locate upstream limits separately from downstream delivery budgets.
- Record the outcome; use cached detail where available instead of blindly repeating execution.
The author’s test log records a successful directory → contract → read-only call sequence on 9 October 2026, returning the three values above. The log is a reported observation; readers can repeat the steps on their own authorized instance. The linked documentation and code are separately inspectable evidence.
This was a metadata smoke test. Production authorization behavior, write operations, upstream size failures, token savings, client compatibility, and complete workflow execution were not tested. Keep those as separate acceptance checks. A useful tool integration makes each boundary explicit enough that an agent can choose its next action from evidence.
- 先浏览目录,再读取当前工具契约,最后按任务需要调用。目录列表用于发现能力,不能据此推断执行权限。
- 本次只读实测返回
schema_version为1flowbase.block-context-contract/v1,contract_version与block_sdk_version均为1.0.0;没有读取客户业务记录或修改应用状态。 -
response_fields在输出映射之后选择返回字段,max_inline_chars是字符预算。两者不能解决已经发生在上游的响应大小拒绝。 - 追加详情优先读取缓存结果,尤其不要为了补回响应内容而重复执行写操作。
- 正文明确区分官方文档和源码、本次实测记录、以及尚未验证的生产与兼容性边界。
Repository sources were checked on 9 October 2026 and pinned to commit f2a94401f85f57091bc0590331e97c6dfa3e7e14.