Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/modelcontextprotocol/python-sdk
/ read
Method
read
src/mcp/server/mcpserver/resources/base.py:41–43 ·
view source on GitHub ↗
Read the resource content.
(self)
Source
from the content-addressed store, hash-verified
39
40
@abc.abstractmethod
41
async
def
read(self) -> str | bytes:
42
""
"Read the resource content."
""
43
pass
# pragma: no cover
Callers
15
read_resource
Method · 0.45
to_image_content
Method · 0.45
to_audio_content
Method · 0.45
test_template_to_resource_conversion
Method · 0.45
test_create_resource
Method · 0.45
test_async_text_resource
Method · 0.45
test_async_binary_resource
Method · 0.45
test_basemodel_conversion
Method · 0.45
test_custom_type_conversion
Method · 0.45
test_template_created_resources_inherit_annotations
Method · 0.45
test_sync_fn_runs_in_worker_thread
Function · 0.45
run
Function · 0.45
Calls
no outgoing calls
Tested by
13
test_template_to_resource_conversion
Method · 0.36
test_create_resource
Method · 0.36
test_async_text_resource
Method · 0.36
test_async_binary_resource
Method · 0.36
test_basemodel_conversion
Method · 0.36
test_custom_type_conversion
Method · 0.36
test_template_created_resources_inherit_annotations
Method · 0.36
test_sync_fn_runs_in_worker_thread
Function · 0.36
run
Function · 0.36
test_get_resource_from_template
Function · 0.36
test_server_stderr_output_reaches_the_errlog_file
Function · 0.36
server_stderr
Function · 0.36