File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,32 +99,32 @@ export type McpResourceResponse = {
9999 } >
100100}
101101
102+ export type McpResourceLinkAnnotations = {
103+ audience ?: ( "user" | "assistant" ) [ ]
104+ priority ?: number
105+ lastModified ?: string
106+ }
107+
108+ // Defined in MCP spec 2025-06-18: https://modelcontextprotocol.io/specification/2025-06-18/server/tools
109+ export type McpResourceLink = {
110+ type : "resource_link"
111+ uri : string
112+ name : string
113+ description ?: string
114+ mimeType ?: string
115+ title ?: string
116+ size ?: number
117+ annotations ?: McpResourceLinkAnnotations
118+ }
119+
102120export type McpToolCallResponse = {
103121 _meta ?: Record < string , any > // eslint-disable-line @typescript-eslint/no-explicit-any
104122 content : Array <
105- | {
106- type : "text"
107- text : string
108- }
109- | {
110- type : "image"
111- data : string
112- mimeType : string
113- }
114- | {
115- type : "audio"
116- data : string
117- mimeType : string
118- }
119- | {
120- type : "resource"
121- resource : {
122- uri : string
123- mimeType ?: string
124- text ?: string
125- blob ?: string
126- }
127- }
123+ | { type : "text" ; text : string }
124+ | { type : "image" ; data : string ; mimeType : string }
125+ | { type : "audio" ; data : string ; mimeType : string }
126+ | { type : "resource" ; resource : { uri : string ; mimeType ?: string ; text ?: string ; blob ?: string } }
127+ | McpResourceLink
128128 >
129129 isError ?: boolean
130130}
Original file line number Diff line number Diff line change 1- import type { ClineAskUseMcpServer , McpExecutionStatus } from "@roo-code/types"
1+ import type { ClineAskUseMcpServer , McpExecutionStatus , McpResourceLink } from "@roo-code/types"
22
33import { Task } from "../task/Task"
44import { formatResponse } from "../prompts/responses"
@@ -282,6 +282,10 @@ export class UseMcpToolTool extends BaseTool<"use_mcp_tool"> {
282282 }
283283 return ""
284284 }
285+ if ( item . type === "resource_link" ) {
286+ const link = item as McpResourceLink
287+ return `[${ link . name } ](${ link . uri } )${ link . description ? ` — ${ link . description } ` : "" } `
288+ }
285289 return ""
286290 } )
287291 . filter ( Boolean )
You can’t perform that action at this time.
0 commit comments