Get the context-name

I have to read the non-local context name from configuration CLI ,the container called servers server .

context.yang file

augment "contexts" {
   list context {
  key "context-name" ;
ordered-by user;
leaf context-name {
   type string ;
description "give the context-name " ;  

server.yang file

augment "contexts/context" {
container servers {
list  server {
 key name;
leaf name {
type string ;
"Give the server name"

In this case, i want to get the context name during the config CLI instance at run time or somehow want to know under which context name that cli run .
here we can have the multiple context name also, but i want to extract only which has used during the confi CLI

(config)# contexts context “context-name” servers server port

Please help me on this issue

it’s not clear where/how specifically you want to “get context” in runtime → are you speaking about callbacks, subscriptions, show templates, something else?
Maybe give a short example on “working” use-case or steps taken by user where you highlight part that is currently not working as you’d like / where is the “missing” context value.