Skip to content

Conversation

@miyamo2
Copy link
Contributor

@miyamo2 miyamo2 commented Apr 23, 2025

v0.7.0 does not work properly when using the anthropic model or google model.
This is because the role must be user to send a content block containing a tool_result type in anthropic and google.

Continue the conversation by sending a new message with the role of user, and a content block containing the tool_result type and the following information:

https://docs.anthropic.com/en/docs/tool-use.

Also, there are only user and model roles in gemini, and tool does not seem to exist.

role string
Optional. The producer of the content. Must be either 'user' or 'model'.

ai.google.dev/api/caching?authuser=5&hl=en#Content

Related: #33

Close: #36

Thank you.

In v0.7.0

anthropic

image

2025/04/25 07:35:19 INFO Model loaded provider=anthropic model=claude-3-5-sonnet-latest
2025/04/25 07:35:19 INFO Initializing server... name=fetch
2025/04/25 07:35:20 INFO Initializing server... name=mcp-restaurant-order
2025/04/25 07:35:21 INFO Initializing server... name=server-brave-search
2025/04/25 07:35:21 INFO Server connected name=mcp-restaurant-order
2025/04/25 07:35:21 INFO Server connected name=server-brave-search
2025/04/25 07:35:21 INFO Server connected name=fetch
2025/04/25 07:35:21 INFO Tools loaded server=fetch count=1
2025/04/25 07:35:21 INFO Tools loaded server=mcp-restaurant-order count=2
2025/04/25 07:35:21 INFO Tools loaded server=server-brave-search count=2

  You: What does MCP stand for? using brave-serch.

  Assistant:


  I'll search for what MCP stands for using Brave web search.

2025/04/25 07:35:30 INFO 🔧 Using tool name=server-brave-search__brave_web_search
2025/04/25 07:35:30 INFO Usage statistics input_tokens=1384 output_tokens=84 total_tokens=1468
2025/04/25 07:35:32 INFO Shutting down MCP servers...

google

image

2025/04/25 07:33:44 INFO Model loaded provider=Google model=gemini-2.0-flash
2025/04/25 07:33:44 INFO Initializing server... name=fetch
2025/04/25 07:33:46 INFO Initializing server... name=mcp-restaurant-order
2025/04/25 07:33:46 INFO Initializing server... name=server-brave-search
2025/04/25 07:33:46 INFO Server connected name=server-brave-search
2025/04/25 07:33:46 INFO Server connected name=fetch
2025/04/25 07:33:46 INFO Server connected name=mcp-restaurant-order
2025/04/25 07:33:46 INFO Tools loaded server=fetch count=1
2025/04/25 07:33:46 INFO Tools loaded server=mcp-restaurant-order count=2
2025/04/25 07:33:46 INFO Tools loaded server=server-brave-search count=2

  You: What does MCP stand for? using brave-serch.
2025/04/25 07:33:57 INFO 🔧 Using tool name=server-brave-search__brave_web_search
2025/04/25 07:33:59 INFO Shutting down MCP servers...

After correction

anthropic

image

2025/04/25 07:27:21 INFO Model loaded provider=anthropic model=claude-3-5-sonnet-latest
2025/04/25 07:27:21 INFO Initializing server... name=fetch
2025/04/25 07:27:22 INFO Initializing server... name=mcp-restaurant-order
2025/04/25 07:27:22 INFO Initializing server... name=server-brave-search
2025/04/25 07:27:23 INFO Server connected name=fetch
2025/04/25 07:27:23 INFO Server connected name=mcp-restaurant-order
2025/04/25 07:27:23 INFO Server connected name=server-brave-search
2025/04/25 07:27:23 INFO Tools loaded server=fetch count=1
2025/04/25 07:27:23 INFO Tools loaded server=mcp-restaurant-order count=2
2025/04/25 07:27:23 INFO Tools loaded server=server-brave-search count=2

  You: What does MCP stand for? using brave-serch.

  Assistant:


  I'll search to find out what MCP stands for using Brave's web search, since this could have multiple meanings depending on the context.

2025/04/25 07:27:28 INFO 🔧 Using tool name=server-brave-search__brave_web_search
2025/04/25 07:27:28 INFO Usage statistics input_tokens=1384 output_tokens=101 total_tokens=1485

  Assistant:


  Based on the search results, MCP can stand for several different things depending on the context:

  1. Model Context Protocol - A recent open standard designed by Anthropic to help AI assistants interact with data and tools
  2. Microsoft Certified Professional - A certification from Microsoft
  3. Microsoft Certified Partner - An independent company providing Microsoft-related products or services
  4. Male Chauvinist Pig (informal, derogatory)
  5. Master Control Program (in computing contexts)

  Given that you're asking this question in the context of the available tools which include "mcp-restaurant-order", it's most likely referring to "Model Context Protocol" which is the system
  that
  enables AI assistants to interact with external tools and services, like the restaurant ordering system we have access to.

google

image

2025/04/25 07:27:42 INFO Model loaded provider=Google model=gemini-2.0-flash
2025/04/25 07:27:42 INFO Initializing server... name=server-brave-search
2025/04/25 07:27:42 INFO Initializing server... name=fetch
2025/04/25 07:27:43 INFO Initializing server... name=mcp-restaurant-order
2025/04/25 07:27:43 INFO Server connected name=server-brave-search
2025/04/25 07:27:43 INFO Server connected name=fetch
2025/04/25 07:27:43 INFO Server connected name=mcp-restaurant-order
2025/04/25 07:27:43 INFO Tools loaded server=server-brave-search count=2
2025/04/25 07:27:43 INFO Tools loaded server=fetch count=1
2025/04/25 07:27:43 INFO Tools loaded server=mcp-restaurant-order count=2

  You: What does MCP stand for? using brave-serch.
2025/04/25 07:27:46 INFO 🔧 Using tool name=server-brave-search__brave_web_search

  Assistant:


  The search results for MCP include:

  • Male Chauvinist Pig
  • Medicaid Managed Care Plan
  • Model Context Protocol
  • Microsoft Certified Professional
  • Macintosh Coprocessor Platform
  • Burroughs MCP, a Unisys/Burroughs computer operating syste

@miyamo2 miyamo2 changed the title fix: tool result handling in anthropic fix: crash when sending tool_result with anthropic Apr 23, 2025
@corani
Copy link
Contributor

corani commented Apr 24, 2025

I've tested setting the role to "user" and that works as well (using a corporate wrapper service around Azure OpenAI). So perhaps it's fine to change it to "user" for all providers?

@miyamo2
Copy link
Contributor Author

miyamo2 commented Apr 24, 2025

So perhaps it's fine to change it to "user" for all providers?

First, the original role:user was changed to role:tool in the v0.7.0 release.
Wasn't this changed with an intention?

@corani
Copy link
Contributor

corani commented Apr 24, 2025

So perhaps it's fine to change it to "user" for all providers?

First, the original role:user was changed to role:tool in the v0.7.0 release. Wasn't this changed with an intention?

It was changed by my commit, as that's the recommendation for the wrapper service I'm using. Since OpenAI is blocked in my network (even the website and documentation 🤦) I can't verify whether OpenAI is recommending it as well.

But I've just checked that it works fine with role = user for me, so likely it isn't required.

@miyamo2
Copy link
Contributor Author

miyamo2 commented Apr 24, 2025

There are only user and model roles in gemini, and tool does not seem to exist.

role string
Optional. The producer of the content. Must be either 'user' or 'model'.

https://ai.google.dev/api/caching?authuser=5&hl=en#Content

Also, OpenAI chat completion only defines 3 roles.

  • user
  • developper(system)
  • assistant

https://platform.openai.com/docs/api-reference/chat/create

However, there seems to be a tool role in ollama.

role: the role of the message, either system, user, assistant, or tool

@miyamo2
Copy link
Contributor Author

miyamo2 commented Apr 24, 2025

Anyway, I could be sure: Google crash too.

image

2025/04/25 05:37:02 INFO <cmd/root.go:495> Model loaded provider=Google model=gemini-2.0-flash
2025/04/25 05:37:02 INFO <cmd/mcp.go:262> Initializing server... name=mcp-restaurant-order
2025/04/25 05:37:03 INFO <cmd/mcp.go:262> Initializing server... name=server-brave-search
2025/04/25 05:37:03 INFO <cmd/mcp.go:262> Initializing server... name=fetch
2025/04/25 05:37:04 INFO <cmd/root.go:521> Server connected name=mcp-restaurant-order
2025/04/25 05:37:04 INFO <cmd/root.go:521> Server connected name=server-brave-search
2025/04/25 05:37:04 INFO <cmd/root.go:521> Server connected name=fetch
2025/04/25 05:37:04 INFO <cmd/root.go:543> Tools loaded server=mcp-restaurant-order count=2
2025/04/25 05:37:04 INFO <cmd/root.go:543> Tools loaded server=server-brave-search count=2
2025/04/25 05:37:04 INFO <cmd/root.go:543> Tools loaded server=fetch count=1

  You: What does MCP stand for? using brave-serch.
2025/04/25 05:37:31 INFO <cmd/root.go:345> 🔧 Using tool name=server-brave-search__brave_web_search
2025/04/25 05:37:32 DEBU <cmd/root.go:424> raw tool result content
  content=
  │ [{Annotated:{Annotations:<nil>} Type:text Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp}]
2025/04/25 05:37:32 DEBU <cmd/root.go:443> created tool result block
  block=
  │ {Type:tool_result Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp ID: ToolUseID:Tool<0> Name: Input:[] Content:[{Annotated:{Annotations:<nil>} Type:text Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp}]}
 tool_id=Tool<0>
2025/04/25 05:37:33 INFO <cmd/root.go:510> Shutting down MCP servers...

And it seems to work fine with role:tool in OpenAI (the original, not the compatible product).

image
image

2025/04/25 06:31:24 INFO <cmd/root.go:495> Model loaded provider=openai model=gpt-4
2025/04/25 06:31:24 INFO <cmd/mcp.go:262> Initializing server... name=fetch
2025/04/25 06:31:25 INFO <cmd/mcp.go:262> Initializing server... name=mcp-restaurant-order
2025/04/25 06:31:25 INFO <cmd/mcp.go:262> Initializing server... name=server-brave-search
2025/04/25 06:31:25 INFO <cmd/root.go:521> Server connected name=mcp-restaurant-order
2025/04/25 06:31:25 INFO <cmd/root.go:521> Server connected name=server-brave-search
2025/04/25 06:31:25 INFO <cmd/root.go:521> Server connected name=fetch
2025/04/25 06:31:25 INFO <cmd/root.go:543> Tools loaded server=fetch count=1
2025/04/25 06:31:25 INFO <cmd/root.go:543> Tools loaded server=mcp-restaurant-order count=2
2025/04/25 06:31:25 INFO <cmd/root.go:543> Tools loaded server=server-brave-search count=2

  You: What does MCP stand for? using brave-serch.
2025/04/25 06:31:48 DEBU <openai/provider.go:48> creating message prompt="What does MCP stand for? using brave-serch." num_messages=1 num_tools=5
2025/04/25 06:31:48 DEBU <openai/provider.go:65> converting message role=user content="What does MCP stand for? using brave-serch." is_tool_response=false
2025/04/25 06:31:48 DEBU <openai/provider.go:153> sending messages to OpenAI messages="[{Role:user Content:0xc000929500 ReasoningContent:<nil> FunctionCall:<nil> ToolCalls:[] Name: ToolCallID:}]" num_tools=5
2025/04/25 06:31:51 INFO <cmd/root.go:345> 🔧 Using tool name=server-brave-search__brave_web_search
2025/04/25 06:31:51 INFO <cmd/root.go:358> Usage statistics input_tokens=673 output_tokens=27 total_tokens=700
2025/04/25 06:31:52 DEBU <cmd/root.go:424> raw tool result content
  content=
  │ [{Annotated:{Annotations:<nil>} Type:text Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp
  │
  │ Title: MCP - Wikipedia
  │ Description: Burroughs <strong>MCP</strong>, a Unisys/Burroughs computer operating system · Microsoft Certified Partner, an independent company that provides Microsoft-related products or services · Microsoft Certified Professional, a certification from Microsoft · Macintosh Coprocessor Platform, an expansion card for the Macintosh; see A/ROSE · Model Context Protocol, a standard ...
  │ URL: https://en.wikipedia.org/wiki/MCP
  │
  │ Title: MCP: What It Is and Why It Matters - by Addy Osmani
  │ Description: <strong>MCP</strong> is an open standard (think “USB-C for AI integrations”) that allows AI models to connect to many different apps and data sources in a consistent way. In simple terms, <strong>MCP</strong> lets an AI assistant talk to various software tools using a common language, instead of each tool requiring a different adapter or custom code. ... So, what does ...
  │ URL: https://addyo.substack.com/p/mcp-what-it-is-and-why-it-matters
  │
  │ Title: Medicaid Managed Care Plan (MCP) Abbreviation | Clarify Health
  │ Description: A <strong>Medicaid Managed Care Plan</strong> (MCP) is a health care plan in which Medicaid recipients receive most or all of their care from an organization under contract with the state.
  │ URL: https://clarifyhealth.com/insights/healthcare-acronyms/mcp/
  │
  │ Title: MCP - What does MCP stand for? The Free Dictionary
  │ Description: Looking for online definition of <strong>MCP</strong> or <strong>what</strong> <strong>MCP</strong> <strong>stands</strong> <strong>for</strong>? <strong>MCP</strong> is listed in the World&#x27;s most authoritative dictionary of abbreviations and acronyms
  │ URL: https://acronyms.thefreedictionary.com/MCP
  │
  │ Title: Introducing the Model Context Protocol \ Anthropic
  │ Description: The <strong>Model Context Protocol</strong> (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.
  │ URL: https://www.anthropic.com/news/model-context-protocol
  │
  │ Title: MCP Explained in 31 Minutes (Without The Hype) - YouTube
  │ Description: Join Maker School &amp; get your first automation customer ⤵️https://www.skool.com/makerschool/aboutAll Make.com &amp; N8N templates mentioned in the clip ⤵️https://
  │ URL: https://www.youtube.com/watch?v=nsFliqg8Dro
  │
  │ Title: 🦸🏻#14: What Is MCP, and Why Is Everyone – Suddenly!– Talking About It?
  │ Description: This made “wire together” integrations brittle and hard to scale. To simplify that, Anthropic came up with <strong>Model Context Protocol</strong> (MCP) – an open standard designed to bridge AI assistants with the world of data and tools, to plug in many different sources of context.
  │ URL: https://huggingface.co/blog/Kseniase/mcp}]
2025/04/25 06:31:52 DEBU <cmd/root.go:443> created tool result block
  block=
  │ {Type:tool_result Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp
  │
  │ Title: MCP - Wikipedia
  │ Description: Burroughs <strong>MCP</strong>, a Unisys/Burroughs computer operating system · Microsoft Certified Partner, an independent company that provides Microsoft-related products or services · Microsoft Certified Professional, a certification from Microsoft · Macintosh Coprocessor Platform, an expansion card for the Macintosh; see A/ROSE · Model Context Protocol, a standard ...
  │ URL: https://en.wikipedia.org/wiki/MCP
  │
  │ Title: MCP: What It Is and Why It Matters - by Addy Osmani
  │ Description: <strong>MCP</strong> is an open standard (think “USB-C for AI integrations”) that allows AI models to connect to many different apps and data sources in a consistent way. In simple terms, <strong>MCP</strong> lets an AI assistant talk to various software tools using a common language, instead of each tool requiring a different adapter or custom code. ... So, what does ...
  │ URL: https://addyo.substack.com/p/mcp-what-it-is-and-why-it-matters
  │
  │ Title: Medicaid Managed Care Plan (MCP) Abbreviation | Clarify Health
  │ Description: A <strong>Medicaid Managed Care Plan</strong> (MCP) is a health care plan in which Medicaid recipients receive most or all of their care from an organization under contract with the state.
  │ URL: https://clarifyhealth.com/insights/healthcare-acronyms/mcp/
  │
  │ Title: MCP - What does MCP stand for? The Free Dictionary
  │ Description: Looking for online definition of <strong>MCP</strong> or <strong>what</strong> <strong>MCP</strong> <strong>stands</strong> <strong>for</strong>? <strong>MCP</strong> is listed in the World&#x27;s most authoritative dictionary of abbreviations and acronyms
  │ URL: https://acronyms.thefreedictionary.com/MCP
  │
  │ Title: Introducing the Model Context Protocol \ Anthropic
  │ Description: The <strong>Model Context Protocol</strong> (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.
  │ URL: https://www.anthropic.com/news/model-context-protocol
  │
  │ Title: MCP Explained in 31 Minutes (Without The Hype) - YouTube
  │ Description: Join Maker School &amp; get your first automation customer ⤵️https://www.skool.com/makerschool/aboutAll Make.com &amp; N8N templates mentioned in the clip ⤵️https://
  │ URL: https://www.youtube.com/watch?v=nsFliqg8Dro
  │
  │ Title: 🦸🏻#14: What Is MCP, and Why Is Everyone – Suddenly!– Talking About It?
  │ Description: This made “wire together” integrations brittle and hard to scale. To simplify that, Anthropic came up with <strong>Model Context Protocol</strong> (MCP) – an open standard designed to bridge AI assistants with the world of data and tools, to plug in many different sources of context.
  │ URL: https://huggingface.co/blog/Kseniase/mcp ID: ToolUseID:call_C56aziLxt1XoS9ybdOtqdUbi Name: Input:[] Content:[{Annotated:{Annotations:<nil>} Type:text Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp
  │
  │ Title: MCP - Wikipedia
  │ Description: Burroughs <strong>MCP</strong>, a Unisys/Burroughs computer operating system · Microsoft Certified Partner, an independent company that provides Microsoft-related products or services · Microsoft Certified Professional, a certification from Microsoft · Macintosh Coprocessor Platform, an expansion card for the Macintosh; see A/ROSE · Model Context Protocol, a standard ...
  │ URL: https://en.wikipedia.org/wiki/MCP
  │
  │ Title: MCP: What It Is and Why It Matters - by Addy Osmani
  │ Description: <strong>MCP</strong> is an open standard (think “USB-C for AI integrations”) that allows AI models to connect to many different apps and data sources in a consistent way. In simple terms, <strong>MCP</strong> lets an AI assistant talk to various software tools using a common language, instead of each tool requiring a different adapter or custom code. ... So, what does ...
  │ URL: https://addyo.substack.com/p/mcp-what-it-is-and-why-it-matters
  │
  │ Title: Medicaid Managed Care Plan (MCP) Abbreviation | Clarify Health
  │ Description: A <strong>Medicaid Managed Care Plan</strong> (MCP) is a health care plan in which Medicaid recipients receive most or all of their care from an organization under contract with the state.
  │ URL: https://clarifyhealth.com/insights/healthcare-acronyms/mcp/
  │
  │ Title: MCP - What does MCP stand for? The Free Dictionary
  │ Description: Looking for online definition of <strong>MCP</strong> or <strong>what</strong> <strong>MCP</strong> <strong>stands</strong> <strong>for</strong>? <strong>MCP</strong> is listed in the World&#x27;s most authoritative dictionary of abbreviations and acronyms
  │ URL: https://acronyms.thefreedictionary.com/MCP
  │
  │ Title: Introducing the Model Context Protocol \ Anthropic
  │ Description: The <strong>Model Context Protocol</strong> (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.
  │ URL: https://www.anthropic.com/news/model-context-protocol
  │
  │ Title: MCP Explained in 31 Minutes (Without The Hype) - YouTube
  │ Description: Join Maker School &amp; get your first automation customer ⤵️https://www.skool.com/makerschool/aboutAll Make.com &amp; N8N templates mentioned in the clip ⤵️https://
  │ URL: https://www.youtube.com/watch?v=nsFliqg8Dro
  │
  │ Title: 🦸🏻#14: What Is MCP, and Why Is Everyone – Suddenly!– Talking About It?
  │ Description: This made “wire together” integrations brittle and hard to scale. To simplify that, Anthropic came up with <strong>Model Context Protocol</strong> (MCP) – an open standard designed to bridge AI assistants with the world of data and tools, to plug in many different sources of context.
  │ URL: https://huggingface.co/blog/Kseniase/mcp}]}
 tool_id=call_C56aziLxt1XoS9ybdOtqdUbi
2025/04/25 06:31:52 DEBU <openai/provider.go:48> creating message prompt="" num_messages=3 num_tools=5
2025/04/25 06:31:52 DEBU <openai/provider.go:65> converting message role=user content="What does MCP stand for? using brave-serch." is_tool_response=false
2025/04/25 06:31:52 DEBU <openai/provider.go:65> converting message role=assistant content="" is_tool_response=false
2025/04/25 06:31:52 DEBU <openai/provider.go:65> converting message role=tool content="" is_tool_response=true
2025/04/25 06:31:52 DEBU <openai/provider.go:108> processing tool response tool_call_id=call_C56aziLxt1XoS9ybdOtqdUbi
  raw_message=
  │ &{Role:tool Content:[{Type:tool_result Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp
  │
  │ Title: MCP - Wikipedia
  │ Description: Burroughs <strong>MCP</strong>, a Unisys/Burroughs computer operating system · Microsoft Certified Partner, an independent company that provides Microsoft-related products or services · Microsoft Certified Professional, a certification from Microsoft · Macintosh Coprocessor Platform, an expansion card for the Macintosh; see A/ROSE · Model Context Protocol, a standard ...
  │ URL: https://en.wikipedia.org/wiki/MCP
  │
  │ Title: MCP: What It Is and Why It Matters - by Addy Osmani
  │ Description: <strong>MCP</strong> is an open standard (think “USB-C for AI integrations”) that allows AI models to connect to many different apps and data sources in a consistent way. In simple terms, <strong>MCP</strong> lets an AI assistant talk to various software tools using a common language, instead of each tool requiring a different adapter or custom code. ... So, what does ...
  │ URL: https://addyo.substack.com/p/mcp-what-it-is-and-why-it-matters
  │
  │ Title: Medicaid Managed Care Plan (MCP) Abbreviation | Clarify Health
  │ Description: A <strong>Medicaid Managed Care Plan</strong> (MCP) is a health care plan in which Medicaid recipients receive most or all of their care from an organization under contract with the state.
  │ URL: https://clarifyhealth.com/insights/healthcare-acronyms/mcp/
  │
  │ Title: MCP - What does MCP stand for? The Free Dictionary
  │ Description: Looking for online definition of <strong>MCP</strong> or <strong>what</strong> <strong>MCP</strong> <strong>stands</strong> <strong>for</strong>? <strong>MCP</strong> is listed in the World&#x27;s most authoritative dictionary of abbreviations and acronyms
  │ URL: https://acronyms.thefreedictionary.com/MCP
  │
  │ Title: Introducing the Model Context Protocol \ Anthropic
  │ Description: The <strong>Model Context Protocol</strong> (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.
  │ URL: https://www.anthropic.com/news/model-context-protocol
  │
  │ Title: MCP Explained in 31 Minutes (Without The Hype) - YouTube
  │ Description: Join Maker School &amp; get your first automation customer ⤵️https://www.skool.com/makerschool/aboutAll Make.com &amp; N8N templates mentioned in the clip ⤵️https://
  │ URL: https://www.youtube.com/watch?v=nsFliqg8Dro
  │
  │ Title: 🦸🏻#14: What Is MCP, and Why Is Everyone – Suddenly!– Talking About It?
  │ Description: This made “wire together” integrations brittle and hard to scale. To simplify that, Anthropic came up with <strong>Model Context Protocol</strong> (MCP) – an open standard designed to bridge AI assistants with the world of data and tools, to plug in many different sources of context.
  │ URL: https://huggingface.co/blog/Kseniase/mcp ID: ToolUseID:call_C56aziLxt1XoS9ybdOtqdUbi Name: Input:[] Content:[{Annotated:{Annotations:<nil>} Type:text Text:Title: MCP - Definition by AcronymFinder
  │ Description: APA style: MCP. (n.d.) <strong>Acronym Finder</strong>.
  │ URL: https://www.acronymfinder.com/MCP.html
  │
  │ Title: MCP Definition & Meaning - Merriam-Webster
  │ Description: What does the abbreviation MCP stand for? Meaning: <strong>male chauvinist pig</strong>.
  │ URL: https://www.merriam-webster.com/dictionary/MCP
  │
  │ Title: MCP Definition & Meaning | Dictionary.com
  │ Description: <strong>MCP</strong> definition: . See examples of <strong>MCP</strong> used in a sentence.
  │ URL: https://www.dictionary.com/browse/mcp
  │
  │ Title: MCP - Wikipedia
  │ Description: Burroughs <strong>MCP</strong>, a Unisys/Burroughs computer operating system · Microsoft Certified Partner, an independent company that provides Microsoft-related products or services · Microsoft Certified Professional, a certification from Microsoft · Macintosh Coprocessor Platform, an expansion card for the Macintosh; see A/ROSE · Model Context Protocol, a standard ...
  │ URL: https://en.wikipedia.org/wiki/MCP
  │
  │ Title: MCP: What It Is and Why It Matters - by Addy Osmani
  │ Description: <strong>MCP</strong> is an open standard (think “USB-C for AI integrations”) that allows AI models to connect to many different apps and data sources in a consistent way. In simple terms, <strong>MCP</strong> lets an AI assistant talk to various software tools using a common language, instead of each tool requiring a different adapter or custom code. ... So, what does ...
  │ URL: https://addyo.substack.com/p/mcp-what-it-is-and-why-it-matters
  │
  │ Title: Medicaid Managed Care Plan (MCP) Abbreviation | Clarify Health
  │ Description: A <strong>Medicaid Managed Care Plan</strong> (MCP) is a health care plan in which Medicaid recipients receive most or all of their care from an organization under contract with the state.
  │ URL: https://clarifyhealth.com/insights/healthcare-acronyms/mcp/
  │
  │ Title: MCP - What does MCP stand for? The Free Dictionary
  │ Description: Looking for online definition of <strong>MCP</strong> or <strong>what</strong> <strong>MCP</strong> <strong>stands</strong> <strong>for</strong>? <strong>MCP</strong> is listed in the World&#x27;s most authoritative dictionary of abbreviations and acronyms
  │ URL: https://acronyms.thefreedictionary.com/MCP
  │
  │ Title: Introducing the Model Context Protocol \ Anthropic
  │ Description: The <strong>Model Context Protocol</strong> (MCP) is an open standard for connecting AI assistants to the systems where data lives, including content repositories, business tools, and development environments. Its aim is to help frontier models produce better, more relevant responses.
  │ URL: https://www.anthropic.com/news/model-context-protocol
  │
  │ Title: MCP Explained in 31 Minutes (Without The Hype) - YouTube
  │ Description: Join Maker School &amp; get your first automation customer ⤵️https://www.skool.com/makerschool/aboutAll Make.com &amp; N8N templates mentioned in the clip ⤵️https://
  │ URL: https://www.youtube.com/watch?v=nsFliqg8Dro
  │
  │ Title: 🦸🏻#14: What Is MCP, and Why Is Everyone – Suddenly!– Talking About It?
  │ Description: This made “wire together” integrations brittle and hard to scale. To simplify that, Anthropic came up with <strong>Model Context Protocol</strong> (MCP) – an open standard designed to bridge AI assistants with the world of data and tools, to plug in many different sources of context.
  │ URL: https://huggingface.co/blog/Kseniase/mcp}]}]}
2025/04/25 06:31:52 DEBU <openai/provider.go:153> sending messages to OpenAI messages="[{Role:user Content:0xc000568880 ReasoningContent:<nil> FunctionCall:<nil> ToolCalls:[] Name: ToolCallID:} {Role:assistant Content:<nil> ReasoningContent:<nil> FunctionCall:<nil> ToolCalls:[{ID:call_C56aziLxt1XoS9ybdOtqdUbi Type:function Function:{Name:server-brave-search__brave_web_search Arguments:{\"query\":\"What does MCP stand for?\"}}}] Name: ToolCallID:} {Role:tool Content:0xc0003c80c0 ReasoningContent:<nil> FunctionCall:<nil> ToolCalls:[] Name: ToolCallID:call_C56aziLxt1XoS9ybdOtqdUbi}]" num_tools=5

  Assistant:


  "MCP" can stand for different things depending on the context:

  1. In general language, MCP can refer to "Male Chauvinist Pig" (source https://www.merriam-webster.com/dictionary/MCP).
  2. In the field of technology and computers, MCP could mean:
    • Microsoft Certified Partner, an independent company that provides Microsoft-related products or services.
    • Microsoft Certified Professional, a certification from Microsoft.
    • Burroughs MCP, a Unisys/Burroughs computer operating system.
    • Macintosh Coprocessor Platform, an expansion card for the Macintosh (source https://en.wikipedia.org/wiki/MCP).
    • Model Context Protocol, an open standard that allows AI models to connect to many different apps and data sources in a consistent way (source https://addyo.substack.com/p/mcp-what-it-is-
    and-why-it-matters).
  3. In the field of health and medicine, MCP could refer to Medicaid Managed Care Plan, a health care plan in which Medicaid recipients receive most or all of their care from an organization
  under contract with the state (source https://clarifyhealth.com/insights/healthcare-acronyms/mcp).

  Please specify the context if you are interested in a particular meaning.

@miyamo2 miyamo2 changed the title fix: crash when sending tool_result with anthropic fix: crash when sending tool_result with anthropic and google Apr 24, 2025
@ezynda3 ezynda3 merged commit 494851a into mark3labs:main Apr 25, 2025
@miyamo2
Copy link
Contributor Author

miyamo2 commented Apr 25, 2025

@ezynda3 @corani
Thank you for your checking and comments!
Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--model anthropic:claude-3-5-sonnet-latest ROLE error

3 participants