File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/protocols_io_mcp/tools Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ async def to_string(step: "ProtocolStepInput") -> str:
3737 if len (step .materials ) > 0 :
3838 step_content += "[Materials]\n "
3939 for material in step .materials :
40- step_content += f"- { material .name .replace (' ' , '' )} { material .quantity } { material .unit .replace (' ' , '' )} \n "
40+ step_content += f"- { material .name .replace (' ' , '_ ' )} { material .quantity } { material .unit .replace (' ' , '_ ' )} \n "
4141 # add reference protocols to step content
4242 if len (step .reference_protocol_ids ) > 0 :
4343 if len (step .materials ) > 0 :
@@ -49,7 +49,7 @@ async def to_string(step: "ProtocolStepInput") -> str:
4949 if response_get_protocol ["status_code" ] != 0 :
5050 return response_get_protocol ["status_text" ]
5151 protocol = await Protocol .from_protocol_id (response_get_protocol ["payload" ]["id" ])
52- step_content += f"- { protocol .title } [{ protocol .id } ] { protocol .doi } \n "
52+ step_content += f"- { protocol .title . replace ( '[' , '<' ). replace ( ']' , '>' ) } [{ protocol .id } ] { protocol .doi } \n "
5353 return step_content
5454
5555class ProtocolStep (BaseModel ):
You can’t perform that action at this time.
0 commit comments