mcp.md +40 −0
110}110}
111```111```
112 112
113### Citation behavior
114
115For both `search` results and `fetch` responses, ChatGPT creates citation
116metadata only when `url` is a non-empty string. A result with a `title` but no
117usable `url` remains ordinary tool output instead of becoming an empty
118citation. To make a result citable, return its canonical `url`.
119
120For example, ChatGPT might call `search` with:
121
122```json
123{ "query": "What is the quarterly plan?" }
124```
125
126The MCP server can respond with a URL-backed result:
127
128```json
129{
130 "structuredContent": {
131 "results": [
132 {
133 "id": "quarterly-plan",
134 "title": "Quarterly plan",
135 "url": "https://example.com/quarterly-plan"
136 }
137 ]
138 },
139 "content": [
140 {
141 "type": "text",
142 "text": "{\"results\":[{\"id\":\"quarterly-plan\",\"title\":\"Quarterly plan\",\"url\":\"https://example.com/quarterly-plan\"}]}"
143 }
144 ]
145}
146```
147
148In this response, the `url` field has a value, which makes the result eligible
149for citation metadata. The query itself does not trigger citation handling. If
150the result omits `url`, or provides an empty or non-string value, ChatGPT
151preserves the result as ordinary tool output.
152
113### Server example153### Server example
114 154
115An easy way to try out this example MCP server is using [Replit](https://replit.com/). You can configure this sample application with your own API credentials and vector store information to try it yourself.155An easy way to try out this example MCP server is using [Replit](https://replit.com/). You can configure this sample application with your own API credentials and vector store information to try it yourself.