Skip to content

Commit 7b2baba

Browse files
committed
Simplify escaping rest route
1 parent 6ed3378 commit 7b2baba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MCP/Tools/RestTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function cache_ttl(): int {
4343
* @return string Full route (e.g. '/saltus-framework/v1/models').
4444
*/
4545
protected function mcp_route( string $path ): string {
46-
return esc_url_raw( '/' . MCPConfig::get_namespace() . $path );
46+
return '/' . trim( MCPConfig::get_namespace(), '/' ) . '/' . ltrim( $path, '/' );
4747
}
4848

4949
/**

0 commit comments

Comments
 (0)