0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

FastMCPのToolReuslt, ToolErrorってなんで必要?

0
Posted at

ToolReuslt

引数が content, structured_content, metaがある。

structured_contentはdictで受け取れる。これってToolReusltがなくてもできるから、contentとmetaがある理由がわからなかった。

contentはLLMやエージェント、人が受け取る用のやつ。

metaはメタデータ、エージェントも読まん。実行管理・デバッグ・観測用。

何か情報を持たせたいときに使える。エージェントに次こうして〜とか差し込めるかも

ToolError

Tool実行時にエージェントや、人に表示させるエラー。内部用のエラーはここに入れない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?